-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for windows debug support (#14048)
Co-authored-by: Jarred Sumner <[email protected]>
- Loading branch information
1 parent
3fc092d
commit 722e3fa
Showing
10 changed files
with
241 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type OS = "Windows"; | ||
|
||
Bun.serve({ | ||
fetch(req: Request) { | ||
return new Response( | ||
`Hello, ${"Windows" as OS}!` | ||
); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import { spawn } from "node:child_process"; | ||
import { exec } from "node:child_process"; | ||
import { readdirSync } from "node:fs"; | ||
import path from "node:path"; | ||
|
||
const { pathname } = new URL("..", import.meta.url); | ||
let { pathname } = new URL("..", import.meta.url); | ||
if (process.platform === "win32") { | ||
pathname = path.normalize(pathname).substring(1); // remove leading slash | ||
} | ||
process.chdir(pathname); | ||
|
||
let path; | ||
let extPath; | ||
for (const filename of readdirSync("extension")) { | ||
if (filename.endsWith(".vsix")) { | ||
path = `extension/${filename}`; | ||
extPath = `extension/${filename}`; | ||
break; | ||
} | ||
} | ||
|
||
if (!path) { | ||
if (!extPath) { | ||
throw new Error("No .vsix file found"); | ||
} | ||
|
||
spawn("code", ["--new-window", `--install-extension=${path}`, `--extensionDevelopmentPath=${pathname}`, "example"], { | ||
exec(`code --new-window --install-extension=${path} --extensionDevelopmentPath=${pathname} example`, { | ||
stdio: "inherit", | ||
}); |
Oops, something went wrong.