Skip to content

Testing & building notes

Mike Griese edited this page Aug 23, 2023 · 2 revisions

Validating schema changes

  1. Open the schema in VsCode, and some test json file in another pane.

  2. Add the following to the top of the file

     "$schema": "file:///Users/migrie.REDMOND/dev/public/terminal/doc/cascadia/profiles.schema.json",

    But, you know, with your actual path/to/the/terminal. Use this instead of the https one that points at the one in main.

  3. I'd recommend getting rid of your profiles and actions, just in case. I constantly have deprecated and experimental things in my settings that have never merged.

  4. There's a button at the botton of VsCode which is VERY useful:

    image

    That'll help you reload the schema in the editor when you make changes.

Manually test different Terminal branding locally

Place this in Directory.build.props in the solution root

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup Label="Branding">
    <!-- For testing purpose: manually change the branding of the Terminal you build -->

    <!-- <WindowsTerminalBranding>Preview</WindowsTerminalBranding> -->
    <!-- <WindowsTerminalBranding>Release</WindowsTerminalBranding> -->

    <!-- Not settings one of the above will default to "dev" -->
  </PropertyGroup>
</Project>

Enabling the debug tap

The "debug tap" is a special mode that lets you see exactly which characters are being sent to the terminal, and exactly what input the Terminal is sending to the client application. This is particularly helpful for debugging rendering and input issues.

image

To enable the debug tap:

  1. Enable debug features by adding "debugFeatures": true, to the global settings
  2. Hold both the left and right alt keys, and open a new tab. What you should see is a tab with two panes in it, and the second one will have the "debug tap", showing all the input and output sent to the Terminal.

At this point, you should repro your issue, and be able to see everything that's in/output to the Terminal. If you've been asked to use the debug tap to repro your issue, please copy the output in the second pane to your reply. If your issue has anything to do with input, then maybe also share a screenshot, so we can differentiate between the output and input (the red text).

Decoding debug tap trace

It's dangerous to go alone, take this: win32-input-decoder.py (gist).

That's a simple python script to try and decode debug tap output to something human-readable

Test terminal PRs Locally

  1. Click "details" under "Terminal CI (Build x64 Build x64 Release Dev) " in the CI results.
  2. On the page that opens, click "View more details on Azure Pipelines".
  3. Search the page for "artifacts" (note spelled with an i). You'll find a link labelled n artifacts produced where n is some number. Click that link.
  4. This page is a bit fiddly. Find the table on the page, then switch to browse mode. Down arrow through the rows until you reach one labelled "drop", then hit right arrow.
  5. In the menu that opens, down arrow to "download artifact" and press enter.
  6. Extract the zip you downloaded. Inside the drop\appx folder, you'll find a CascadiaPackage_0.0.1.0_x64.msix. Rename it to a .zip and extract.
  7. From that directory, run WindowsTerminal.exe to test wt, or OpenConsole.exe to test conhost.

This makes some assumptions that you already have the VCLibs installed and other dependencies, but for the most part it should work.