Skip to content

Fix/add relative path configuration debug adapters#12

Merged
edriouk merged 11 commits into
mainfrom
fix/add-relative-path-configuration-debug-adapters
Mar 11, 2026
Merged

Fix/add relative path configuration debug adapters#12
edriouk merged 11 commits into
mainfrom
fix/add-relative-path-configuration-debug-adapters

Conversation

@arneschmid
Copy link
Copy Markdown
Collaborator

Fixes

ARM-software/vscode-cmsis-csolution#502

Changes

  • adds path-type parameter to debug-adapters.yml schema under user-interface / options
  • path-type can be of type 'absoulte' | 'relative'
  • unset path-type defaults to relative (no-breaking change for current implementation)
- name: "Keil uVision"
    template: uVision.adapter.json                         # template files
    defaults:
      uv4: "${env:LOCALAPPDATA}/Keil_v5/UV4/UV4.exe"
    user-interface:
      - section: Debug Interface
        description: Interface configuration for the debug port
        options:
          - name: uVision
            description: Path and filename of uVision executable
            yml-node: uv4
            type: file
            path-type: absolute
            default: "${env:LOCALAPPDATA}/Keil_v5/UV4/UV4.exe"

Screenshots

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for choosing whether file paths coming from debug-adapter UI “file” options are stored/returned as relative to the solution or as absolute filesystem paths, enabling adapters like uVision to require absolute paths while preserving current default behavior.

Changes:

  • Introduces PathType ('absolute' | 'relative') and plumbs it through the Manage Solution webview’s SELECT_FILE message options.
  • Updates file selection handling in the extension host to return absolute vs. relative paths based on pathType (default remains relative).
  • Updates unit tests around SELECT_FILE (but currently in a way that conflicts with the intended default behavior).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/views/manage-solution/view/components/manage-solution.tsx Reads per-option path-type from debug-adapter UI options and sends it with SELECT_FILE.
src/views/manage-solution/messages.ts Adds PathType and extends FileSelectorOptionsType to include pathType.
src/views/manage-solution/manage-solution-webview-main.ts Implements absolute-vs-relative path behavior when returning FILE_SELECTED.
src/views/manage-solution/manage-solution-webview-main.test.ts Updates expectations for SELECT_FILE / FILE_SELECTED behavior.
src/debug/debug-adapters-yaml-file.ts Extends UI option typing to include 'path-type' on file options.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/debug/debug-adapters-yaml-file.ts Outdated
Comment thread src/views/manage-solution/messages.ts Outdated
Comment thread src/views/manage-solution/view/components/manage-solution.tsx Outdated
Comment thread src/views/manage-solution/manage-solution-webview-main.test.ts
Comment thread src/views/manage-solution/manage-solution-webview-main.ts
@qltysh
Copy link
Copy Markdown

qltysh Bot commented Mar 5, 2026

Qlty

Coverage Impact

⬇️ Merging this pull request will decrease total coverage on main by 0.01%.

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
Coverage rating: C Coverage rating: C
src/views/manage-solution/view/components/manage-solution.tsx0.0%216-217
Coverage rating: C Coverage rating: C
src/views/manage-solution/manage-solution-webview-main.ts100.0%
Total33.3%
🤖 Increase coverage with AI coding...

In the `fix/add-relative-path-configuration-debug-adapters` branch, add test coverage for this new code:

- `src/views/manage-solution/view/components/manage-solution.tsx` -- Line 216-217

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/debug/debug-adapters-yaml-file.ts Outdated
Comment thread src/debug/debug-adapters-yaml-file.ts
Comment thread src/views/manage-solution/manage-solution-webview-main.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JonatanAntoni JonatanAntoni requested a review from edriouk March 9, 2026 08:27
@JonatanAntoni
Copy link
Copy Markdown
Member

LGTM, but @edriouk may be able to verify the change on Windows.

@edriouk edriouk merged commit 2a11b07 into main Mar 11, 2026
12 checks passed
@edriouk edriouk deleted the fix/add-relative-path-configuration-debug-adapters branch March 11, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relative Path Generated by Browse in Manage Solution Causes Execution Failure while opening µVision

4 participants