需要打开调试并向localhost显示页面:8080

0dxa2lsx  于 2021-09-29  发布在  Java
关注(0)|答案(1)|浏览(571)

我需要在调试中打开浏览器,他需要打开谷歌浏览器的链接

  1. localhost:8080

在我的 luch.json 我有:

  1. {
  2. // Use IntelliSense to learn about possible attributes.
  3. // Hover to view descriptions of existing attributes.
  4. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "configurations": [
  7. {
  8. "url":"http://localhost:8080",
  9. "type": "pwa-chrome",
  10. "request": "launch",
  11. "name": "Open index.html",
  12. "file": "c:\\Users\\franc\\Desktop\\Angular js\\Progetti\\Modulo 4 routing\\codice mio\\index.html",
  13. }
  14. ]
  15. }

问题在于google chrome调试是否指向此链接:

  1. file:///C:/Users/franc/Desktop/Angular%20js/Progetti/Modulo%203%20Controlli/Codice%20mio/index.html/orders

什么也没装。有人能帮我用loalhost:8080中的VisualStudio代码打开调试控制台并加载数据吗?

0qx6xfy6

0qx6xfy61#

将此添加到您的配置中,

  1. "version": "0.2.0",
  2. "configurations": [
  3. {
  4. "name": "Debug in Chrome",
  5. "type": "chrome",
  6. "request": "launch",
  7. "port": 9229,
  8. "webRoot": "${workspaceRoot}/src",
  9. "runtimeArgs": [
  10. "debug:start"
  11. ],
  12. "resolveSourceMapLocations": [
  13. "${webRoot}/**",
  14. "!**/node_modules/**"
  15. ]
  16. }
  17. ]

chrome.exe --remote-debugging-port=9229 从您的终端/cmd。
workspaceroot指定Web服务器根的工作区绝对路径。用于将/app.js等路径解析为磁盘上的文件。“/”的路径Map的简写形式。

展开查看全部

相关问题