remote debugging update
This commit is contained in:
20
.vscode/launch.json
vendored
20
.vscode/launch.json
vendored
@@ -1,11 +1,19 @@
|
|||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"name": "Attach to BitBurner",
|
"name": "Attach to BitBurner (Steam)",
|
||||||
"port": 9222,
|
"port": 9222,
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"type": "chrome",
|
||||||
|
"request": "attach",
|
||||||
|
"name": "Attach to BitBurner (Web)",
|
||||||
|
"port": 9222,
|
||||||
|
"urlFilter": "https://bitburner-official.github.io/*",
|
||||||
|
"webRoot": "${workspaceFolder}"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
43
README.md
43
README.md
@@ -155,3 +155,46 @@ let ctx = await createContext();
|
|||||||
ctx.watch();
|
ctx.watch();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Remote Debugging
|
||||||
|
|
||||||
|
This tool supports remote debugging for both the Steam version and the web version running in a Chrome/Chromium browser.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const createContext = async () => await context({
|
||||||
|
entryPoints: [
|
||||||
|
'servers/**/*.js',
|
||||||
|
'servers/**/*.jsx',
|
||||||
|
'servers/**/*.ts',
|
||||||
|
'servers/**/*.tsx',
|
||||||
|
],
|
||||||
|
outbase: "./servers",
|
||||||
|
outdir: "./build",
|
||||||
|
plugins: [
|
||||||
|
BitburnerPlugin({
|
||||||
|
port: 12525,
|
||||||
|
types: 'NetscriptDefinitions.d.ts',
|
||||||
|
remoteDebugging: true
|
||||||
|
})
|
||||||
|
],
|
||||||
|
bundle: true,
|
||||||
|
format: 'esm',
|
||||||
|
platform: 'browser',
|
||||||
|
logLevel: 'info'
|
||||||
|
});
|
||||||
|
|
||||||
|
const ctx = await createContext();
|
||||||
|
ctx.watch();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Steam
|
||||||
|
|
||||||
|
To enable remote debugging for the Steam version go into the properties for Bitburner (little cogwheel to the right when viewing Bitburner in your library) and add the following launch option `--remote-debugging-port=9222`.
|
||||||
|
|
||||||
|
### Chrome/Chromium
|
||||||
|
|
||||||
|
To enable remote debugging for your browser you need to launch it over the commandline like so:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
<path-to-chrome> --remote-debugging-port=9222
|
||||||
|
```
|
||||||
|
|||||||
@@ -17,17 +17,14 @@ const createContext = async () => await context({
|
|||||||
mirror: {
|
mirror: {
|
||||||
},
|
},
|
||||||
distribute: {
|
distribute: {
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
platform: 'browser',
|
platform: 'browser',
|
||||||
logLevel: 'debug',
|
logLevel: 'debug',
|
||||||
sourcemap: 'inline',
|
|
||||||
sourceRoot: '/build/server',
|
|
||||||
sourcesContent: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const ctx = await createContext();
|
const ctx = await createContext();
|
||||||
ctx.watch();
|
ctx.watch();
|
||||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "bb-external-editor",
|
"name": "bb-external-editor",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bb-external-editor",
|
"name": "bb-external-editor",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"esbuild": "^0.23.0",
|
"esbuild": "^0.23.0",
|
||||||
"esbuild-bitburner-plugin": "^1.5.1"
|
"esbuild-bitburner-plugin": "^1.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/aix-ppc64": {
|
"node_modules/@esbuild/aix-ppc64": {
|
||||||
@@ -567,9 +567,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/esbuild-bitburner-plugin": {
|
"node_modules/esbuild-bitburner-plugin": {
|
||||||
"version": "1.5.1",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/esbuild-bitburner-plugin/-/esbuild-bitburner-plugin-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild-bitburner-plugin/-/esbuild-bitburner-plugin-1.6.0.tgz",
|
||||||
"integrity": "sha512-gpQzpO/3Da54badhZK3aHVbjHPYXO7aAxcM6MEE27PnU1p8TXETsLjl7IDv4qGapfvj0W8jrf5a/F7qvI3H7PA==",
|
"integrity": "sha512-kzebZLlHiCCutU0lDwlNXWvlOFT4O23byCjc/vSqLReiYgTIBWuglt1LlFA4oziy8Hr3gGkJae/OxUe+3YPZiw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"websocket": "^1.0.34"
|
"websocket": "^1.0.34"
|
||||||
|
|||||||
@@ -20,6 +20,6 @@
|
|||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"esbuild": "^0.23.0",
|
"esbuild": "^0.23.0",
|
||||||
"esbuild-bitburner-plugin": "^1.5.1"
|
"esbuild-bitburner-plugin": "^1.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user