diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f0a5d2e --- /dev/null +++ b/.vscode/launch.json @@ -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/*" + } + }, + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 39c0280..a86fe4b 100644 --- a/README.md +++ b/README.md @@ -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] diff --git a/tsconfig.json b/tsconfig.json index c7e5b34..86e6ba7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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" + ] } } } \ No newline at end of file