Visual Studio 2017 CE中的TypeScript调试不起作用

问题描述 投票:0回答:2

我有带角度客户端的WebApi解决方案。之前,我可以在打字稿文件中设置断点并使用Chrome对其进行调试。长期以来,我没有使用此解决方案,但现在我需要。当我设置断点时,我会收到警告消息:“当前不会命中该断点。设置了断点但尚未绑定”。

我已将Visual Studio 2017更新为最新版本(15.9.17),但这无济于事。

任何想法如何在Visual Studio中调试类型脚本?

typescript debugging visual-studio-2017
2个回答
0
投票

尝试一下。

在VS代码中,转到调试->开始调试->添加配置

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Node Inspector",
        "type": "node",
        "request": "launch",
        "args": ["${workspaceRoot}/src/index.ts"],
        "runtimeArgs": ["-r", "ts-node/register"],
        "cwd": "${workspaceRoot}",
        "protocol": "inspector",
        "internalConsoleOptions": "openOnSessionStart",
        "env": {
            "TS_NODE_IGNORE": "false"
        }
    }
]

}

并运行它。

https://gist.github.com/cecilemuller/2963155d0f249c1544289b78a1cdd695那里得到了

希望有帮助。


0
投票

我决定将WebApi项目和ClientApp分成两个不同的存储库,并在更合适和更舒适的环境中继续开发客户端,所以我选择了WebStorm

© www.soinside.com 2019 - 2024. All rights reserved.