Open santiagocabrera96 opened 6 months ago
OS: macOS 14.0 VSCode version: 1.85.1 CodeLLDB version: 1.10.0 Compiler: zig 0.11.0
I want to debug a file that can handle two or three command line arguments.
launch.json
{ "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "Debug", "program": "${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}", "args": "${input:args}", "cwd": "${workspaceFolder}", "preLaunchTask": "build zig" } ], "inputs": [ { "id": "args", "type": "promptString", "description": "args" } ] }
When I'm prompted I write "1 2 3"
But, that resolves to a single parameter (argc is 2).
If I directly include the input in the config file it works as expected.
{ "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "Debug", "program": "${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}", "args": "1 2 3", "cwd": "${workspaceFolder}", "preLaunchTask": "build zig" } ], "inputs": [ { "id": "args", "type": "promptString", "description": "args" } ] }
Now it says that argc is 4 as expected. And the first parameter is "1", not "1 2 3".
Initial debug configuration: { type: 'lldb', request: 'launch', name: 'Debug', program: '${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}', args: '${input:args}', cwd: '${workspaceFolder}', preLaunchTask: 'build zig', __configurationTarget: 6 } Resolved debug configuration: { type: 'lldb', request: 'launch', name: 'Debug', program: '${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}', args: [ '${input:args}' ], cwd: '${workspaceFolder}', preLaunchTask: 'build zig', __configurationTarget: 6, relativePathBase: '/Users/santiago.cabrera/dev/zig/computer-enhance/part2', _adapterSettings: { displayFormat: 'auto', showDisassembly: 'auto', dereferencePointers: true, suppressMissingSourceFiles: true, evaluationTimeout: 5, consoleMode: 'commands', sourceLanguages: null, terminalPromptClear: null, evaluateForHovers: true, commandCompletions: true, reproducer: false } }
Initial debug configuration: { type: 'lldb', request: 'launch', name: 'Debug', program: '${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}', args: '1 2 3', cwd: '${workspaceFolder}', preLaunchTask: 'build zig', __configurationTarget: 6 } Resolved debug configuration: { type: 'lldb', request: 'launch', name: 'Debug', program: '${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}', args: [ '1', '2', '3' ], cwd: '${workspaceFolder}', preLaunchTask: 'build zig', __configurationTarget: 6, relativePathBase: '/Users/santiago.cabrera/dev/zig/computer-enhance/part2', _adapterSettings: { displayFormat: 'auto', showDisassembly: 'auto', dereferencePointers: true, suppressMissingSourceFiles: true, evaluationTimeout: 5, consoleMode: 'commands', sourceLanguages: null, terminalPromptClear: null, evaluateForHovers: true, commandCompletions: true, reproducer: false } }
Me, too. But my lang is Rust.🤡
OS: macOS 14.0 VSCode version: 1.85.1 CodeLLDB version: 1.10.0 Compiler: zig 0.11.0
I want to debug a file that can handle two or three command line arguments.
launch.json
When I'm prompted I write "1 2 3"
But, that resolves to a single parameter (argc is 2).
If I directly include the input in the config file it works as expected.
launch.json
Now it says that argc is 4 as expected. And the first parameter is "1", not "1 2 3".
Verbose log case with issue
Verbose log case without input request, but written in config