【问题标题】:Getting error when debugging Mocha with Visual Studio Code and Node.js使用 Visual Studio Code 和 Node.js 调试 Mocha 时出错
【发布时间】:2017-02-15 18:24:20
【问题描述】:

我正在使用 Visual Studio Code、Node.js、mochachai 调试一些代码。

当我使用 gulp 运行测试时,我没有收到任何错误,但是当我尝试调试时,我收到了这个错误:

Stacktrace (bbbbbbbb-bbbbbbbb) 00000391AD6041E9 0000000000000000: 
==== JS stack trace =========================================

Security context: 00000391AD6C9FC9 <JS Object>#0#
    1: /* anonymous */ [00000391AD604189 <undefined>:1] [pc=000000FE0EB996F4] (this=000000EE5546EB79 <JS Global Object>#1#)
    5: evaluate [native mirrors.js:1062] [pc=000000FE0E48FB1D] (this=000002F14C5E8D69 <a FrameMirror with map 0000000162ACAD09>#2#,source=000002F14C5E8C01 <String[10]: etapa.nome>,disable_break=00000391AD604231 <true>,opt_context_object=00000391AD604189 <undefined>)
    6: evaluateRequest_ [native debug.js:1453] [pc=000000FE0E48DA40] (this=000002F14C4BC571 <a DebugCommandProcessor with map 000002A9FEDB6519>#3#,aM=000002F14C5E8B69 <an Object with map 000002A9FEDB6EB9>#4#,aT=000002F14C5E8CA9 <a ProtocolMessage with map 000002A9FEDBBD71>#5#)
    7: /* anonymous */ [00000391AD604189 <undefined>:1] [pc=000000FE0E49AD7A] (this=000002F14C4BC571 <a DebugCommandProcessor with map 000002A9FEDB6519>#3#,e=000002F14C5E8B69 <an Object with map 000002A9FEDB6EB9>#4#,r=000002F14C5E8CA9 <a ProtocolMessage with map 000002A9FEDBBD71>#5#)
    8: processDebugJSONRequest [native debug.js:961] [pc=000000FE0E48C821] (this=000002F14C4BC571 <a DebugCommandProcessor with map 000002A9FEDB6519>#3#,json_request=000002F14C5E8AB9 <String[150]: {"command":"vscode_evaluate","arguments":{"expression":"etapa.nome","disable_break":true,"maxStringLength":10000,"frame":0},"type":"request","seq":31}>)
    9: processDebugRequest [native debug.js:854] [pc=000000FE0E48C0D3] (this=000002F14C4BC571 <a DebugCommandProcessor with map 000002A9FEDB6519>#3#,aM=000002F14C5E8AB9 <String[150]: {"command":"vscode_evaluate","arguments":{"expression":"etapa.nome","disable_break":true,"maxStringLength":10000,"frame":0},"type":"request","seq":31}>)
   14: /* anonymous */ [c:\node\myproject\testes\unitarios\modules-test\pipeline-test\pipeline.spec.js:220] [pc=000000FE0EB4A653] (this=000001BABEC3BD79 <a Context with map 000002A9FEDB5549>#6#,done=000002F14C4B7CD1 <JS Function (SharedFunctionInfo 0000002C47494A39)>#7#)
   15: callFnAsync [C:\node\myproject\node_modules\mocha\lib\runnable.js:362] [pc=000000FE0EB3F5D3] (this=000000EE5546EB79 <JS Global Object>#1#,fn=000001BABEC41049 <JS Function (SharedFunctionInfo 00000066AD2F8ED9)>#8#)
   16: run [C:\node\myproject\node_modules\mocha\lib\runnable.js:314] [pc=000000FE0E4E1466] (this=000001BABEC40111 <a Test with map 0000000162A6C7A1>#9#,fn=000002F14C4B73B1 <JS Function (SharedFunctionInfo 0000002C47467429)>#10#)
   17: runTest [C:\node\myproject\node_modules\mocha\lib\runner.js:438] [pc=000000FE0E4E0B1E] (this=000002B3478F53B9 <a Runner with map 0000000162AC7B31>#11#,fn=000002F14C4B73B1 <JS Function (SharedFunctionInfo 0000002C47467429)>#10#) ....

我不知道这个错误可能是什么原因以及如何避免它。

【问题讨论】:

    标签: node.js debugging mocha.js visual-studio-code chai


    【解决方案1】:

    我找到了问题的原因。 当我调试时,手表中有变量,我只是将其删除,问题不再发生。 可能是 Visual Studio Code 中的错误,我正在使用 Visual Studio Code 1.6.0 Insiders

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-06
      • 2015-08-30
      • 2021-01-09
      • 1970-01-01
      • 1970-01-01
      • 2016-06-06
      • 1970-01-01
      相关资源
      最近更新 更多