"Windows Terminal" app package cannot be debugged in default VS configuration #982

Closed
opened 2026-01-30 22:13:01 +00:00 by claunia · 11 comments
Owner

Originally created by @finesse-fingers on GitHub (May 11, 2019).

If anyone can help me get started, I can't seem to get debugging to work in VS2019. I am able to build, run and deploy the app, however, any breakpoints I set don't work when I try to debug with F5 (I saw @miniksa on youtube debug, so I know it should work).

When I stop/terminate debugging I get the following:
image
Perhaps this is related?

  • Windows build number: 10.0.18362.86
  • VS 2019 16.0.3 (Community)
Originally created by @finesse-fingers on GitHub (May 11, 2019). If anyone can help me get started, I can't seem to get debugging to work in VS2019. I am able to build, run and deploy the app, however, any breakpoints I set don't work when I try to debug with F5 (I saw @miniksa on youtube debug, so I know it should work). When I stop/terminate debugging I get the following: ![image](https://user-images.githubusercontent.com/19501248/57566969-e49adb80-7415-11e9-96c2-0fe8e56956d1.png) Perhaps this is related? * Windows build number: 10.0.18362.86 * VS 2019 16.0.3 (Community)
claunia added the Issue-BugResolution-ExternalArea-Build labels 2026-01-30 22:13:01 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (May 11, 2019):

This problem haunts us. The secret is something you'd never expect, and something that belongs in our getting started guide.

Go to the properties for the CascadiaPackage project, choose Debug, and change the project type from "Mixed (Managed and Native)" to "Native Only".

@DHowett-MSFT commented on GitHub (May 11, 2019): This problem _haunts_ us. The secret is something you'd never expect, and something that belongs in our getting started guide. Go to the properties for the _CascadiaPackage_ project, choose Debug, and change the project type from "_Mixed (Managed and Native)_" to "_Native Only_".
Author
Owner

@pkarakal commented on GitHub (May 11, 2019):

Can you explain why this happens in more detail than the Error thrown provides?

@pkarakal commented on GitHub (May 11, 2019): Can you explain why this happens in more detail than the Error thrown provides?
Author
Owner

@DHowett-MSFT commented on GitHub (May 11, 2019):

Sure. The “Windows app packaging” project type (wapproj) in the Visual Studio project system is a derivative of the C# project type csproj. Owing to that, VS assumes that by default any application launched from WAP projects will start up the CLR.

Since this one doesn’t, it can’t be debugged until we tell VS to give up on the CLR.

@DHowett-MSFT commented on GitHub (May 11, 2019): Sure. The “Windows app packaging” project type (`wapproj`) in the Visual Studio project system is a derivative of the C# project type `csproj`. Owing to that, VS assumes that by default any application launched from WAP projects will start up the CLR. Since this one doesn’t, it can’t be debugged until we tell VS to give up on the CLR.
Author
Owner

@oising commented on GitHub (May 11, 2019):

@krystian-mwebdev Wrong place to ask. Any links placed here will be immediately removed because there will be a non-trivial amount of people who will assume because it's on the official repo, it's a supported release.

@oising commented on GitHub (May 11, 2019): @krystian-mwebdev Wrong place to ask. Any links placed here will be immediately removed because there will be a non-trivial amount of people who will assume because it's on the official repo, it's a supported release.
Author
Owner

@finesse-fingers commented on GitHub (May 11, 2019):

I am happy to update README to reflect this.

@finesse-fingers commented on GitHub (May 11, 2019): I am happy to update README to reflect this.
Author
Owner

@finesse-fingers commented on GitHub (May 11, 2019):

On second thought, it looks like it is being addressed in #704.

@finesse-fingers commented on GitHub (May 11, 2019): On second thought, it looks like it is being addressed in #704.
Author
Owner

@zadjii-msft commented on GitHub (May 12, 2019):

I'm not sure this is actually in #704, @bkot88 feel free to make another pr

@zadjii-msft commented on GitHub (May 12, 2019): I'm not sure this is actually in #704, @bkot88 feel free to make another pr
Author
Owner

@TheCloudSaver commented on GitHub (May 12, 2019):

I've not added any new info in my PR, just fixed typo's ;)

@TheCloudSaver commented on GitHub (May 12, 2019): I've not added any new info in my PR, just fixed typo's ;)
Author
Owner

@finesse-fingers commented on GitHub (May 13, 2019):

It seems when debugging in "Native Only" mode, the app throws an exception when drop down is clicked (to open a new tab).

image

This is in src/cascadia/WindowsTerminal/main.cpp.

@finesse-fingers commented on GitHub (May 13, 2019): It seems when debugging in "Native Only" mode, the app throws an exception when drop down is clicked (to open a new tab). ![image](https://user-images.githubusercontent.com/19501248/57591634-c8ae4b80-7575-11e9-881e-6b2f7ce89327.png) This is in src/cascadia/WindowsTerminal/main.cpp.
Author
Owner

@zadjii-msft commented on GitHub (May 13, 2019):

@bkot88 That's known, but the cause is very unknown at this time. Could you open a second issue to track that particular bug?

@zadjii-msft commented on GitHub (May 13, 2019): @bkot88 That's known, but the cause is very unknown at this time. Could you open a second issue to track that particular bug?
Author
Owner

@curtisgray commented on GitHub (Apr 9, 2020):

This problem haunts us. The secret is something you'd never expect, and something that belongs in our getting started guide.

Go to the properties for the CascadiaPackage project, choose Debug, and change the project type from "Mixed (Managed and Native)" to "Native Only".

The CascadiaPackage can crash Visual Studio when the Properties (right-click) menu is selected. To fix the crash so VS can load Properties, select x64 in the Platform dropdown.

cascadiapackage-properties-fix

@curtisgray commented on GitHub (Apr 9, 2020): > > > This problem _haunts_ us. The secret is something you'd never expect, and something that belongs in our getting started guide. > > Go to the properties for the _CascadiaPackage_ project, choose Debug, and change the project type from "_Mixed (Managed and Native)_" to "_Native Only_". The `CascadiaPackage` can crash Visual Studio when the `Properties` (right-click) menu is selected. To fix the crash so VS can load Properties, select `x64` in the Platform dropdown. ![cascadiapackage-properties-fix](https://user-images.githubusercontent.com/48138103/78856594-2ef55580-79f5-11ea-9347-24135b854c3c.jpg)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#982