ry 说他不能复现
大家能帮我试试在你那儿能不能复现吗?
代码:
// a.ts
import * as ts from 'https://dev.jspm.io/typescript@3.9.3';
console.log(ts.default.transpileModule('const foo: number = 1;', {}).outputText);
.vscode/launch.json
配置:
{
"version": "0.2.0",
"configurations": [
{
"env": {
"RUST_BACKTRACE": "full"
},
"name": "Deno",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": ["run", "--inspect-brk", "-A", "a.ts"],
"port": 9229
}
]
}
然后在 vscode 中运行调试工具,预期会报错:
/Users/xcatliu/.deno/bin/deno run --inspect-brk -A a.ts
Debugger listening on ws://127.0.0.1:9229/ws/118bc875-11b7-43b2-8b0a-30baa323b8ad
Debugger session started.
thread 'main' panicked at 'already borrowed: BorrowMutError', /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libcore/cell.rs:878:9
stack backtrace:
0: 0x110d7e9bf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h83d53b696ac99295
1: 0x110daadfe - core::fmt::write::hf81c429634e1f3ed
2: 0x110d75917 - std::io::Write::write_fmt::had2a3b01a2c037b5
3: 0x110d8100a - std::panicking::default_hook::{{closure}}::ha991e4eca34b4afa
4: 0x110d80d4c - std::panicking::default_hook::h722aa3f5c1c31788
5: 0x110d815d8 - std::panicking::rust_panic_with_hook::h2cd47f71d6d55501
6: 0x110d811a2 - rust_begin_unwind
7: 0x110dd595f - core::panicking::panic_fmt::h299f54c72477a62a
8: 0x110dd5865 - core::result::unwrap_failed::hf7a9e1e19e331f17
9: 0x1101dd1c6 - deno_core::bindings::send::h9bde1f22d54f964b
10: 0x1101bf4ad - <extern "C" fn(A0) .> R as rusty_v8::support::CFnFrom<F>>::mapping::c_fn::h184c60d18e8b8431
11: 0x11025eb4f - _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE
12: 0x11025e061 - _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE
13: 0x11025d6d1 - _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE
fatal runtime error: failed to initiate panic, error 5