Skip to content

Commit 1c8337a

Browse files
committed
debug, but do not launch my code
1 parent e3bd61b commit 1c8337a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Developing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Open `winget-cli\src\AppInstallerCLI.sln` in Visual Studio and build. We current
3333

3434
After the build finishes, deploy the solution from Build > Deploy Solution. You can then run the client from the command line using `wingetdev`.
3535

36-
You can also directly run the client from Visual Studio by setting the `AppInstallerCLIPackage` project as the startup project and pressing <kbd>F5</kbd>. To prevent the client from exiting as soon as it finishes its execution, you can add the `--wait` command line argument in the project's debug settings.
37-
3836
To enable step-through debugging, right click on `AppInstallerCLIPackage` in the Solution Explorer, select Properties, and navigate to the Debug tab. In the Debugger type selection, change "Application process" and "Background task process" to "Native Only". This will allow you to add breakpoints and step through the code. The main entry point for the client is in `src/AppInstallerCLI/main.cpp`
3937

38+
The best way to debug the client is to select `Do not launch, but debug my code when it starts` in the `Debug` tab. You can then use the `wingetdev` command in a terminal session, or any PowerShell code for COM API interaction, which will get picked up by the debugger.
39+
4040
## Running Unit Tests
4141

4242
The unit tests are located inside the `AppInstallerCLITests` project. When the solution is built, all tests are compiled under `src/<ARCHITECTURE>/<Debug|Release>/AppInstallerCLITests`. An executable `AppInstallerCLITests.exe` is generated in this directory to run the tests. Run `AppInstallerCLITests.exe` from the command line to execute the tests. To see all available options, run `AppInstallerCLITests.exe --help`.

0 commit comments

Comments
 (0)