Bug report
Describe the bug
If I start the main worker with --inspect-main --inspect-brk args and import the json file in the main worker code, the following error will occur
2024-12-02T10:52:42.988080Z ERROR ThreadId(03) base::rt_worker::implementation::default_handler: worker boot error: Uncaught SyntaxError: Unexpected non-whitespace character after JSON at position 574 (line 20 column 1)
Error: main worker boot error: worker boot error
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
main worker code:
import { STATUS_CODE } from "jsr:@std/http";
console.log(STATUS_CODE.Accepted);
run edge-runtime with --inspect-main and --inspect-brk
./target/debug/edge-runtime "$@" start \
--inspect-main \
--inspect-brk \
--main-service ./test-main
Expected behavior
The main worker runs normally and waits for debugging to start
Screenshots
System information
Additional context
The reason for the error may be that the inline sourcemap is added to the json file here:
|
src.push_str("//# sourceMappingURL=data:application/json;base64,"); |
|
base64::prelude::BASE64_STANDARD.encode_string(source_map, &mut src); |
Bug report
Describe the bug
If I start the main worker with
--inspect-main--inspect-brkargs and import the json file in the main worker code, the following error will occurTo Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
main worker code:
run edge-runtime with
--inspect-mainand--inspect-brk./target/debug/edge-runtime "$@" start \ --inspect-main \ --inspect-brk \ --main-service ./test-mainExpected behavior
The main worker runs normally and waits for debugging to start
Screenshots
System information
Additional context
The reason for the error may be that the inline sourcemap is added to the json file here:
edge-runtime/crates/sb_module_loader/standalone/standalone_module_loader.rs
Lines 264 to 265 in 5707665