From 45eb35434d375b8f58e707c33fa90a2f864b0cf9 Mon Sep 17 00:00:00 2001 From: 1zumii <524123601@qq.com> Date: Wed, 8 Jan 2025 09:51:47 +0800 Subject: [PATCH] chore(linter): add vscode debugger launch config (#8271) 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> --- .vscode/launch.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8694caa09..7c101313a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,6 +14,23 @@ "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" } ] }