redhat-developer / redhat-developer/lsp4ij
Support PyCharm's built-in macros in DAP configuration fields (especially File)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 344
- Forks
- 113
- Avg merge
- 5h 22m
- Merged PRs (30d)
- 15
Description
I'm trying to make a Run/Debug Configuration for a Debug Adapter Protocol (in launch mode) that uses whatever file the editor is focused on (rather than hardcoding a specific path that I need to change every time I jump to a different file). This should be possible using PyCharm built-in macros (e.g., $FilePath$), but they only work in a few places (and not where I need them).
Partial support seems to already exist - built-in macros can be used as expected on the Server tab:
However, those same macros don't work anywhere on the Configuration tab:
Explanation of image annotations:
$ContentRoot$is specified in the Working Directory field.${workspaceFolder}(a different kind of macro?) is specified in the DAP parameters field.- Note: this kind of macro works as expected.
$FilePath$is specified directly in the DAP parameters field.- When the launch request is sent to the DAP server, both built-in macros ultimately remain unexpanded.
Please extend support for PyCharm's built-in macros to the Configuration tab (ideal), or at least allow something like $FilePath$ in the File and/or DAP parameters field.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the DAP launch configuration handles the Configuration tab's File, Working Directory, and DAP parameters fields, then compare it with the existing macro expansion on the Server tab. Reproduce the launch request using $FilePath$ and $ContentRoot$; done means the selected PyCharm file and other built-in macros are expanded before the request is sent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100