admin管理员组文章数量:1406943
I am trying to hit breakpoints in VS code when serving an SPA from an ASP.NET Core app.
The SPA is built with webpack and placed in the ${workspaceFolder}/build
folder.
The content is then copied to the ASP.Net Core app's folder structure as laid out below.
The index file with a reference to the app.<hash>.js
is in public wwwroot
. The app.<hash>.js
is in a protected (requires authorization) WebContent
folder. I have tried to place app.<hash>.js.map
in both wwwroot
and WebContent
folders.
This is the current state of my launch configuration in VS code launch.json
:
{
"type": "chrome",
"name": "Launch Chrome against WebService",
"sourceMaps": true,
"request": "launch",
"url": "http://127.0.0.1:5080",
"webRoot": "${workspaceFolder}/build/WebContent",
"resolveSourceMapLocations": [
"${workspaceFolder}/build/WebContent/**",
"!http://127.0.0.1:5080/**"
],
"sourceMapPathOverrides": {
"http://127.0.0.1:5080/WebContent/app.*.js": "${workspaceFolder}/build/WebContent/app.*.js.map",
}
}
I have tried multiple variations of this launch config to make my breakpoints bind, but either the app.<hash>.js
or app.<hash>.js.map
is loaded into VS code debugging but never both of them.
So how do load both app.<hash>.js
and app.<hash>.js.map
from a running ASP.NET Core app into a VS Code debugging session so my breakpoints can bind?
On a side note: Chrome loads the sourcemap, and it works, so it's not an issue with the sourcemap.
本文标签: How to make VS code load sourcemaps from an ASPNET Core appStack Overflow
版权声明:本文标题:How to make VS code load sourcemaps from an ASP.NET Core app - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744943024a2633605.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论