Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating tutorials for C# Dev KIt #41440

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

webreidi
Copy link

@webreidi webreidi commented Jun 14, 2024

Copy link
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

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

It looks good, I left a few comments. I've only gone through the first tutorial, will start on 2-5 Monday. I'm only reviewing .NET 8 sections -- I left a comment with suggestions on how to deal with 6-7.

docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/with-visual-studio-code.md Outdated Show resolved Hide resolved
Copy link
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

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

Looks good! I noted some minor issues and one that will take some time to fix (terminal vs. debug console).

@@ -62,11 +48,11 @@ The breakpoint is located after a `Console.ReadLine` method call. The **Debug Co

:::image type="content" source="media/debugging-with-visual-studio-code/start-debugging.png" alt-text="Start debugging":::

1. Select the **Terminal** tab to see the "What is your name?" prompt that the program displays before waiting for a response.
1. Select the **Debug Console** tab to see the "What is your name?" prompt that the program displays before waiting for a response.

:::image type="content" source="media/debugging-with-visual-studio-code/select-terminal-net6.png" alt-text="Select the Terminal tab":::
Copy link
Contributor

Choose a reason for hiding this comment

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

The text is correct, but the image is out of sync with it, still showing Terminal selected, with the program output in the Terminal.

@@ -90,8 +76,6 @@ The **Debug Console** window lets you interact with the application you're debug

:::image type="content" source="media/debugging-with-visual-studio-code/continue-debugging.png" alt-text="Continue debugging":::
Copy link
Contributor

Choose a reason for hiding this comment

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

With these changes to the tutorial, it throws an exception at this point:

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Console.dll: 'Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.'

This is because we are reading from the console, whereas the previous tutorial version read from the terminal.
We will have to make a new version of the code, with Console.ReadLine() and "Press enter to continue" at the end instead of Console.ReadKey(true) and "Press any key to continue" Right now the 3 versions (VS, VS Mac, VSC) of tutorials 1 and 2 share the code file that has the code for "enhance the app" in tutorial 1, so we need to do one of the following:

And with this change, the rest of tutorials 1 and 2 will need changes in many places where it talks about the terminal or the debug console.

docs/core/tutorials/library-with-visual-studio-code.md Outdated Show resolved Hide resolved
docs/core/tutorials/library-with-visual-studio-code.md Outdated Show resolved Hide resolved
@tdykstra
Copy link
Contributor

@webreidi If your time for working on this is limited at the moment, let me know if you'd like me to address the remaining feedback myself in a PR to your PR branch. I expect to have some time I could spend on it next week.

webreidi and others added 7 commits July 9, 2024 12:54
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
@webreidi
Copy link
Author

webreidi commented Jul 9, 2024

@webreidi If your time for working on this is limited at the moment, let me know if you'd like me to address the remaining feedback myself in a PR to your PR branch. I expect to have some time I could spend on it next week.

Yeah, I get very limited time to work on things as I'm pulled in a million directions. If you have time to finish this one up, I would greatly appreciate it.

@BillWagner BillWagner modified the milestones: July 2024, August 2024 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants