A Visual Studio Code extension to debug your Javascript code on targets that support the Chrome Debugging Protocol.
I am having a hair-pulling time attempting to map a folder (containing code common to all projects) which sits outside of my main src folder.
I have this in launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "SABRE1",
"url": "http://localhost:4200/*",
"webRoot": "/home/victor/src/sabre/sabre-hr",
"sourceMapPathOverrides": {
"webpack:///./*": "${webRoot}/*",
"webpack:///./sabre-common/*": "/home/victor/src/sabre/sabre-common/*"
},
"runtimeExecutable": "/usr/bin/chromium-browser",
"trace" : true,
"userDataDir": "${workspaceRoot}/.vscode/chrome"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
}
I want to be able to add traps in the "common" files too - but I get the old "sourcemaps problem?" response.
I created a simple new asp.net mvc core app on macOS using dotnet new mvc
then I run it using launch.json
in VS Code
I can debug C# just fine but I cannot debug javascript. When I put a breakpoint in site.js it stays gray and it says
no symbols have been loaded
Any idea what could cause this? Should I be able to debug javascript on macOS in VS Code?
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/Ludewig.PhotoSite.dll",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
},
"linux": {
"command": "xdg-open"
}
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceRoot}/Views"
}
},
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8081",
"webRoot": "${workspaceRoot}",
"trace": true
},
- webpack:///src/components/Fields/Content.jsx?e3b2 (src/components/Fields/Content.jsx)