Skip to content

dev: VS Code integration (build, test, CLI, debug, profile)#595

Merged
andiwand merged 3 commits into
mainfrom
vscode-integration
Jul 5, 2026
Merged

dev: VS Code integration (build, test, CLI, debug, profile)#595
andiwand merged 3 commits into
mainfrom
vscode-integration

Conversation

@andiwand

@andiwand andiwand commented Jul 5, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Sets up the repo for VS Code with parity to the existing CLion workflow: build, test, run CLI tools, debug, and profile.

What's included

File Purpose
.vscode/extensions.json Recommends CMake Tools, clangd, CodeLLDB; marks ms-vscode.cpptools unwanted (conflicts with clangd)
.vscode/settings.json CMake Tools uses the Conan-generated presets; clangd IntelliSense pointed at cmake-build-relwithdebinfo/compile_commands.json
.vscode/tasks.json Build (odr, odr_test, CLI), filtered gtest runs, translate, env regen, Instruments profiling
.vscode/launch.json CodeLLDB debug configs for odr_test (filter prompt), translate, meta, server — with runtime env + build pre-step
scripts/gen-vscode-env.py Extracts the Conan runtime env (pdf2htmlEX/poppler/fontconfig/wvWare/libmagic paths) from the test preset into .vscode/.env
scripts/run-with-env.sh Loads .vscode/.env and execs — used by test/CLI/profiler tasks

.vscode/.env (machine-specific Conan cache paths) is gitignored.

First-time setup

  1. Install the recommended extensions (VS Code prompts).
  2. Status bar → select CMake preset conan-relwithdebinfo.
  3. Run task "env: regenerate .vscode/.env" after any conan install.

Daily use

  • Build: ⇧⌘B (default odr_test) or CMake Tools status bar.
  • Test: task "test: run odr_test (filtered)" → gtest filter prompt.
  • CLI: task "cli: translate …" (absolute paths).
  • Debug: F5 → pick a config (LLDB breakpoints/stepping, same env as tests).
  • Profile: task "profile: Instruments Time Profiler …" → records a .trace, opens Instruments.app.

Notes

  • IntelliSense uses clangd (matches existing .clangd / .clang-tidy), not the Microsoft engine.
  • .vscode/ is tracked (shareable) except .env.
  • Verified: env wrapper launches odr_test (ran Quantity.*) and translate (produced HTML); JSON + xctrace template check out.

Configure the repo for VS Code with parity to the existing CLion setup:

- CMake Tools drives the Conan-generated presets for building.
- clangd for IntelliSense (matches .clangd / .clang-tidy); cpptools marked
  unwanted to avoid engine conflicts.
- Tasks for building odr/odr_test/CLI, running filtered gtest suites, running
  translate, and Instruments (xctrace) Time Profiler profiling.
- CodeLLDB launch configs to debug odr_test/translate/meta/server.
- scripts/gen-vscode-env.py extracts the Conan runtime env (pdf2htmlEX,
  poppler, fontconfig, wvWare, libmagic paths) from the test preset into
  .vscode/.env; scripts/run-with-env.sh loads it for tasks.
- .vscode/.env (machine-specific Conan cache paths) is gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvSNQg6fxTXkmLj3g3RrY2

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd91be9cb0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .vscode/tasks.json Outdated
andiwand and others added 2 commits July 5, 2026 16:19
The odr_test test and profiling tasks override cwd to the build dir but
invoked scripts/run-with-env.sh relatively, resolving it to a path inside
the build tree that does not exist. Anchor the wrapper to
${workspaceFolder} while keeping ./test/odr_test relative to the build cwd.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvSNQg6fxTXkmLj3g3RrY2
Wrap test/scripts/compare_output.sh and compare_output_server.sh as tasks
so the Docker-based visual diff can be run from VS Code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvSNQg6fxTXkmLj3g3RrY2
@andiwand andiwand enabled auto-merge (squash) July 5, 2026 14:37
@andiwand andiwand merged commit 2daaca7 into main Jul 5, 2026
11 checks passed
@andiwand andiwand deleted the vscode-integration branch July 5, 2026 14:53
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.

1 participant