agentleFS
MicrosoftKnown publishermicrosoft/PTVS/.claude/skills/glass-tests/SKILL.md

glass-tests

Skill2.6k starsChanged 6 months agoApache-2.0View on GitHub

Use when working with PTVS Glass tests: setup_glass.py, run_glass.py, Glass.TestAdapter, Newtonsoft.Json assembly mismatches, Azure Pipelines Glass cache, TestScript.xml, glass2.exe, and mixed-mode Python debugger tests.

Trending

Quiet this year.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the microsoft/PTVS repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/PTVS

The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 17

Talked about on GitHub and Hacker News (17 times).

On GitHub · 15

10 more on GitHub

On Hacker News · 2

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when setting up, running, debugging, or investigating CI failures for PTVS Glass tests.

    line 11
  2. Distinctive:

    Prefer passing the build output explicitly, especially for VS 18 builds:

    line 27
  3. Distinctive:

    If setup needs internal drop access, provide an auth token environment variable or allow the interactive credential flow:

    line 33
  4. Distinctive:

    Run all tests or a single test:

    line 45
  5. Very specific:

    Start with the PR log and TestResults/PythonTests.trx.

    line 54
  6. Very specific:

    Check Build/templates/run_tests.yml to see whether GlassTests came from cache.

    line 59
  7. Very specific:

    Do not assume a PTVS NuGet restore or package update will fix Glass runner dependency conflicts.

    line 61
  8. Very specific:

    Look for generated logs, dumps, and copied debuggee files under the runtime GlassTests\PythonTests\...\obj\<configuration>\ and …

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PTVS Glass Tests

When to Use

Use this skill when setting up, running, debugging, or investigating CI failures for PTVS Glass tests. Glass tests exercise Visual Studio debugger behavior, including mixed-mode Python/native scenarios, and require Microsoft-internal drops for the Glass runner.

Link to existing human-facing documentation instead of duplicating it. Start with Python/Tests/GlassTests/readme.txt, which links the internal Concord Glass docs and presentation.

Key Files

  • Build/setup_glass.py: downloads drop.exe, Glass, NuGet tools, and vstest drops; extracts VSIX payloads; copies PTVS debugger bits; discovers installed Python versions; generates .GlassTestProps files; verifies the test listing.
  • Build/run_glass.py: calls copy_ptvs_output(), verifies the runtime test root, and invokes vstest.console.exe with /Parallel and TRX logging.
  • Build/templates/run_tests.yml: installs Python versions, restores or populates the GlassTests cache, acquires the Azure DevOps token, runs setup, runs tests, and publishes TRX results.
  • Python/Tests/GlassTests/PythonTests/PythonConcord.GlassTestRoot: root Glass test configuration.
  • Python/Tests/GlassTests/PythonTests/**/TestScript.xml: individual debugger test scripts with commands, expected events, breakpoints, and source expectations.
  • GlassTests/: generated/runtime directory for downloaded Glass bits and copied tests; do not treat it as the source of truth for test definitions.

Local Workflow

  1. Build PTVS first so the chosen build output contains EnvironmentDiscover.exe, Microsoft.Python*, and DkmDebu* files.
  2. Prefer passing the build output explicitly, especially for VS 18 builds:

    python Build\setup_glass.py --buildOutput BuildOutput\Debug18.0\raw\binaries
  3. If setup needs internal drop access, provide an auth token environment variable or allow the interactive credential flow:

    python Build\setup_glass.py --authTokenVariable SYSTEM_ACCESSTOKEN --buildOutput <path-to-raw-binaries>
  4. List discovered tests after setup:

    python Build\setup_glass.py --verifyListing
  5. Run all tests or a single test:

    python Build\run_glass.py --buildOutput BuildOutput\Debug18.0\raw\binaries
    python Build\run_glass.py --buildOutput BuildOutput\Debug18.0\raw\binaries Repr_Bytes-311-64

CI Failure Workflow

  1. Start with the PR log and TestResults/PythonTests.trx.
  2. Classify the failure:
    • Setup/drop/auth failure before vstest.console.exe starts.
    • Discovery/adapter failure after vstest.console.exe starts but before individual tests run.
    • glass2.exe or TestScript.xml failure inside a specific test case.
  3. Check Build/templates/run_tests.yml to see whether GlassTests came from cache. Cache hits skip setup_glass.py, but run_glass.py still calls copy_ptvs_output().
  4. For assembly binding errors, inspect every Newtonsoft.Json.dll under GlassTests and compare assembly versions. Glass.TestAdapter.dll expects Newtonsoft.Json, Version=13.0.0.0; NuGet/vstest VSIX extraction can place older 9.x or 10.x copies in the runner tree. The compatible copy usually comes from GlassTests\Glass\Newtonsoft.Json.dll.
  5. Do not assume a PTVS NuGet restore or package update will fix Glass runner dependency conflicts. The failing assembly may come from downloaded Glass/NuGet/vstest VSIX payloads, not from packages/.

Debugging TestScript Failures

  1. Reproduce one test at a time with python Build\run_glass.py --buildOutput <path> <test-name>.
  2. Inspect the failing test's TestScript.xml and source files under Python/Tests/GlassTests/PythonTests/.
  3. Compare the error log against expected events, source file names, line numbers, breakpoints, and function names in the script.
  4. Look for generated logs, dumps, and copied debuggee files under the runtime GlassTests\PythonTests\...\obj\<configuration>\ and bin\<configuration>\ paths.
  5. To debug Glass itself, set GLASS_DEBUG=1, rerun one test, attach Visual Studio to glass2.exe, and check assertions or event handling.
  6. To debug with the real product, follow Python/Tests/GlassTests/readme.txt: run PTVS under the debugger, open the generated test folder, mirror the TestScript.xml breakpoints, and use launch.vs.json with the intended interpreter.

Common Pitfalls

  • Full setup is Microsoft-internal because drop.exe downloads from internal DevDiv artifact drops.
  • run_glass.py without --buildOutput historically probes 17.0 build output paths; pass --buildOutput for local VS 18 builds.
  • EnvironmentDiscover.exe not found usually means the build output path is wrong or stale.
  • PythonConcord.GlassTestRoot or PythonEngine.regdef missing means the runtime test copy is incomplete or setup did not run successfully.
  • Cache hits can preserve stale GlassTests contents. Fixes that must run before test execution should be in the run_glass.py path, usually via copy_ptvs_output().
  • Runtime files under GlassTests/ are generated and cacheable; source test changes belong under Python/Tests/GlassTests/.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.