[C#] Console.WriteLine Debugging

  • Context: C# 
  • Thread starter Thread starter frenzal_dude
  • Start date Start date
  • Tags Tags
    Debugging
Click For Summary
SUMMARY

The discussion focuses on debugging the C# command Console.WriteLine to understand the underlying Windows operating system calls. Participants highlight that the source code for .NET is available, and suggest resources for exploring it, including links to Microsoft's documentation. It is established that the Console.WriteLine method interacts with the Windows API, and users may encounter compiled library code, making low-level debugging challenging. Visual Studio tools can assist in navigating this complexity.

PREREQUISITES
  • Understanding of C# programming and the .NET framework
  • Familiarity with Windows API and its functions
  • Basic knowledge of Visual Studio debugging tools
  • Experience with assembly language for low-level code analysis
NEXT STEPS
  • Explore the .NET source code available on Microsoft's GitHub repository
  • Learn about Windows API functions related to console output
  • Investigate Visual Studio's debugging features for examining managed and unmanaged code
  • Study assembly language to understand low-level interactions with hardware
USEFUL FOR

Software developers, particularly those working with C# and .NET, systems programmers, and anyone interested in low-level debugging and Windows API interactions.

frenzal_dude
Messages
76
Reaction score
0
Hi,
how can I debug the C# command Console.WriteLine("text"); so I can see what windows operating system code gets called? Is it possible to go to lower levels? Ie. see what code gets called to make the pixels light up on your monitor to display the text?

I know that's really low level, and probably a lot of you are thinking why would anyone want to know that. But someone must have worked it out, and I'm curious to see how it works.
 
Last edited by a moderator:
Technology news on Phys.org
The problem you are probably going to run into is that you will quickly get to library code (already compiled) as at best you will be able to see the header files for that code. Even you want to start looking at the libraries you will have to do that in assembly and it will be painful, but if you have Visual Studio they probably have a tool that will let you do it.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
3
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
Replies
52
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 34 ·
2
Replies
34
Views
4K