Add remote debugging setup created by DarkMio

This commit is contained in:
SlyCedix 2022-01-09 20:43:51 -05:00
parent e0f16244db
commit 510ddf4b22
3 changed files with 36 additions and 7 deletions

20
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Bitburner Render Process",
"address": "127.0.0.1",
"port": 9222,
"request": "attach",
"type": "pwa-chrome",
"timeout": 15000,
"webRoot": "${workspaceRoot}/src",
"sourceMapPathOverrides": {
"http://localhost:8000/sources/*": "${workspaceRoot}/src/*"
}
},
]
}

View File

@ -30,3 +30,7 @@ To update your Netscript Definitions, run `npm run defs` in a terminal
Press F1 and Select `Bitburner: Enable File Watcher` to enable auto uploading to the game
If you run `watcher.js` in game, the game will automatically detect file changes and restart the associated scripts
## Deugging
For debugging bitburner on Steam you will need to enable a remote debugging port. This can be done by rightclicking bitburner in your Steam library and selecting properties. There you need to add `--remote-debugging-port=9222` [Thanks @DarkMio]

View File

@ -1,9 +1,8 @@
{
"include": [
"NetscriptDefinitions.d.ts",
"src/**/*", "foo.ts",
"src/**/*",
],
"compilerOptions": {
"module": "esnext",
"target": "esnext",
@ -11,16 +10,22 @@
"noImplicitReturns": true,
"noImplicitThis": true,
"esModuleInterop": true,
"sourceMap": false,
"inlineSourceMap": true,
"sourceRoot": "http://localhost:8000/sources/",
"strict": true,
"rootDir": "src/",
"outDir": "dist/",
"baseUrl": "src/",
"paths": {
"/*.js": [ "*" ],
"*.js": [ "*" ],
"@ns": ["../NetscriptDefinitions.d.ts"]
"/*.js": [
"*"
],
"*.js": [
"*"
],
"@ns": [
"../NetscriptDefinitions.d.ts"
]
}
}
}