2016-11-15 6 views
1

vsコードのデバッグ拡張機能を使用して、Typescriptコードをクロムでデバッグしようとしています。 Webサーバーとして私はnodejsを使用しています(VSコードのプラグインとしても)。私はFirefoxでそれをやっているときに、私のブレークポイントは、したがって、ヒットしている私はクロムを使用するとき、私は、次のエラーメッセージが出ます:ここでchromeでnode.jsを使用したVSCodeのTypescriptのデバッグ

******** Unhandled error in debug adapter: TypeError: Path must be a string. Received null 
at assertPath (path.js:7:11) 
at Object.dirname (path.js:697:5) 
at Object.resolveMapPath (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapUtils.js:106:96) 
at getSourceMapContent (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapFactory.js:71:30) 
at Object.getMapForGeneratedPath (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapFactory.js:29:30) 
at SourceMaps.processNewSourceMap (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMaps.js:63:32) 
at BaseSourceMapTransformer.scriptParsed (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\transformers\baseSourceMapTransformer.js:189:37) 
at ChromeDebugAdapter.onScriptParsed (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\chrome\chromeDebugAdapter.js:314:56) 
at Client.chrome.Debugger.onScriptParsed.params (C:\Users\pazureck\.vscode\extensions\msjsdiag.debugger-for-chrome-2.2.2\node_modules\vscode-chrome-debug-core\out\src\chrom[...] 

を私launch.jsonである:ここでは

{ 
"version": "0.2.0", 
"configurations": [ 
    { 
     "name": "Launch Firefox index.html (sourcemaps)", 
     "type": "firefox", 
     "url": "http://localhost:8080/index.html", 
     "webRoot": "${workspaceRoot}", 
     "request": "launch" 
    }, 
    { 
     "name": "Launch Chrome with sourcemaps", 
     "type": "chrome", 
     "request": "launch", 
     "url": "http://localhost:8080/index.html", 
     "sourceMaps": true, 
     "webRoot": "${workspaceRoot}" 
    }, 
    { 
     "type": "node", 
     "request": "launch", 
     "name": "Launch Program", 
     "sourceMaps": true, 
     "program": "${workspaceRoot}/server.js", 
     "cwd": "${workspaceRoot}", 
     "outFiles": ["${workspaceRoot}/**/*.js"] 
    }, 
    // Composite Launches ********************************************************************************************************* 
    { 
     "name": "Launch Node.js with FF", 
     "type": "composite", 
     "configurationNames": [ 
      "Launch Program", "Launch Firefox index.html (sourcemaps)" 
     ], 
     "request": "launch" 
    }, 
    { 
     "name": "Launch Node.js with Chrome", 
     "type": "composite", 
     "configurationNames": [ 
      "Launch Program", "Launch Chrome with sourcemaps" 
     ], 
     "request": "launch" 
    } 
] 
} 

は私のサーバーです.js

私はマッピングファイルを公開していないようですが、Chromeはそれらを見つけられないようですか?私はまた、私のノードのデバッグ設定のoutFilesについては、Googleを介して有用な何も得ていません。

この問題に対処する方法、またはクロムデバッグアダプタがパスに対してヌルを受信して​​いる理由は何ですか?指定されたアドレスを開始して開きます。

ありがとうございました!

EDIT:エラーが私の場合に発生する前に

これはまた、JSコンソールにまで来ている:

Tue, 15 Nov 2016 20:34:41 GMT send deprecated hidden: use dotfiles: 'allow' instead at node_modules\serve-static\index.js:96:18 
+0

私はこの今日の使用を開始したばかりで、同じエラーが発生しました。ビジュアルスタジオコード "デバッグアダプターの未処理エラー:"のGoogle検索で、これが唯一の結果であることを示しています。何か壊れた拡張機能のアップデートがあったのでしょうか? – silencedmessage

+0

私はこれで唯一の人ではありません。たぶんこれはエラーの原因のヒントでしょうか? (プラグインのヘルプセクションから): "ソースマップにはソースファイルへのパスがあり、この拡張子はそのパスを使ってディスク上の元のソースファイルを探します。起動設定のwebRootプロパティと組み合わせて元のソースファイルへの正しいパスを構築できることを確認してください。 –

+1

私はこの権利を理解していれば、https://github.com/hbenl/vscode-firefox-debugで同じコードをデバッグできますが、https://github.com/Microsoft/vscode-chrome-debugではデバッグできません。これはソースマップの問題またはクロムデバッガの拡張に関する問題です。 vscode chromeデバッガgithubの問題を検索しましたか? – Steffen

答えて

0

これが答えでした。上記の設定を使用すると、Chromeでnode.jsを使用することができます。迅速な修正のためのdevsのおかげです。

関連する問題