mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
refer to this [reply](https://discord.com/channels/1079625926024900739/1080101477672046712/1265758176754794598), add CodeLLDB launch config for debugging oxlint. usage for real dev like: ```json { "type": "lldb", "request": "launch", "name": "Debug Oxlint", "cargo": { "env": { "RUSTFLAGS": "-g" }, "args": ["build", "--bin=oxlint", "--package=oxlint"], "filter": { "name": "oxlint", "kind": "bin" } }, "args": ["--ignore-pattern=./ignore/**"], "cwd": "/home/xxx/temp/oxlint-7102" } ``` besides, i tired add config in `args` to override `Cargo.toml` `[profile.dev] debug = false`, but cargo in CodeLLDB throw error. ```json "args": [ "build", "--bin=oxlint", "--package=oxlint", "--config profile.dev.debug=true" ] ``` --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
36 lines
987 B
JSON
36 lines
987 B
JSON
// A launch configuration that compiles the extension and then opens it inside a new window
|
|
{
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"type": "extensionHost",
|
|
"request": "launch",
|
|
"name": "Launch Client",
|
|
"runtimeExecutable": "${execPath}",
|
|
"args": ["--extensionDevelopmentPath=${workspaceFolder}/editors/vscode"],
|
|
"sourceMaps": true,
|
|
"outFiles": ["${workspaceFolder}/editors/vscode/dist/*.js"],
|
|
"env": {
|
|
"SERVER_PATH_DEV": "${workspaceRoot}/target/debug/oxc_language_server",
|
|
"RUST_LOG": "debug"
|
|
}
|
|
},
|
|
{
|
|
"type": "lldb",
|
|
"request": "launch",
|
|
"name": "Debug Oxlint",
|
|
"cargo": {
|
|
"env": {
|
|
"RUSTFLAGS": "-g"
|
|
},
|
|
"args": ["build", "--bin=oxlint", "--package=oxlint"],
|
|
"filter": {
|
|
"name": "oxlint",
|
|
"kind": "bin"
|
|
}
|
|
}
|
|
// "args": ["--ARGS-TO-OXLINT"],
|
|
// "cwd": "PATH-TO-TEST-PROJECT"
|
|
}
|
|
]
|
|
}
|