带有Visual Studio代码的Debug Docsify.js
我正在使用
我面临的问题是,当我在本地计算机上打开index.html
时,浏览器无法读取.md
文件。
仅当我在服务器上发布页面时,它才能正常工作。因此,我尝试使用Visual Studio代码运行文件。我添加了Microsoft Edge工具。
自动,Visual Studio代码为我创建启动> JSON
{
"configurations": [
{
"type": "pwa-msedge",
"name": "Launch Microsoft Edge",
"request": "launch",
"runtimeArgs": [
"--remote-debugging-port=9222"
],
"url": "C:\\Projects\\FromGitHub\\agile\\index.html",
"presentation": {
"hidden": true
}
},
{
"type": "pwa-msedge",
"name": "Launch Microsoft Edge in headless mode",
"request": "launch",
"runtimeArgs": [
"--headless",
"--remote-debugging-port=9222"
],
"url": "C:\\Projects\\FromGitHub\\agile\\index.html",
"presentation": {
"hidden": true
}
},
{
"type": "vscode-edge-devtools.debug",
"name": "Open Edge DevTools",
"request": "attach",
"url": "C:\\Projects\\FromGitHub\\agile\\index.html",
"presentation": {
"hidden": true
}
}
],
"compounds": [
{
"name": "Launch Edge Headless and attach DevTools",
"configurations": [
"Launch Microsoft Edge in headless mode",
"Open Edge DevTools"
]
},
{
"name": "Launch Edge and attach DevTools",
"configurations": [
"Launch Microsoft Edge",
"Open Edge DevTools"
]
}
]
}
,但同样,我也有同样的问题。如何允许浏览器访问我的本地文件以调试文档?有没有办法为其配置Visual Studio代码?
I'm creating some documentation using Docsify.js plus some plugins. I really like this tool to create documentation. If you need I created a repo with a template on GitHub.
The problem I'm facing is when I open the index.html
on my local machine, the browser can't read the .md
files.
Only when I publish the pages on a server, it is working. So, I tried to use Visual Studio Code to run the files. I added the Microsoft Edge Tools.
Automatically, Visual Studio Code creates a launch.json
for me
{
"configurations": [
{
"type": "pwa-msedge",
"name": "Launch Microsoft Edge",
"request": "launch",
"runtimeArgs": [
"--remote-debugging-port=9222"
],
"url": "C:\\Projects\\FromGitHub\\agile\\index.html",
"presentation": {
"hidden": true
}
},
{
"type": "pwa-msedge",
"name": "Launch Microsoft Edge in headless mode",
"request": "launch",
"runtimeArgs": [
"--headless",
"--remote-debugging-port=9222"
],
"url": "C:\\Projects\\FromGitHub\\agile\\index.html",
"presentation": {
"hidden": true
}
},
{
"type": "vscode-edge-devtools.debug",
"name": "Open Edge DevTools",
"request": "attach",
"url": "C:\\Projects\\FromGitHub\\agile\\index.html",
"presentation": {
"hidden": true
}
}
],
"compounds": [
{
"name": "Launch Edge Headless and attach DevTools",
"configurations": [
"Launch Microsoft Edge in headless mode",
"Open Edge DevTools"
]
},
{
"name": "Launch Edge and attach DevTools",
"configurations": [
"Launch Microsoft Edge",
"Open Edge DevTools"
]
}
]
}
but, again, I have the same problem. How can I allow the browser to access my local file to debug the documentation? Is there a way to configure Visual Studio Code for it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试使用
docsify serve
?Did you try using
docsify serve
?