Awesome Programming Knowledge
  • Introduction
  • Writing Better Code
    • Books
      • Refactoring: Improving the Design of Existing Code
        • Extract Method
        • Quotes
          • CodeForHuman
          • Make Comment Superfluous
          • The Rule of Three
      • Clean code: A Handbook of Agile Software Craftsmanship
        • Meaningful name
        • Single Level of Abstraction
        • Small Functions
        • Avoid having BOOL Function Parameters
      • Working effectively with legacy code
        • Sprout Method
      • Code Complete
        • Minimizing Scope
        • Avoid variables with hidden meanings
        • Describe Motivations of Decisions
      • Structure and Interpretation of Computer Programs
        • Declarative and Imperative Knowledge
    • Articles
      • Two ways of constructing a software design
  • Design
    • Books
      • The Art of Unix Programming
        • The SPOT Rule
        • Rule of Clarity: Clarity is better than cleverness
      • Design Patterns
      • Agile Software Development, Principles, Patterns, and Practices
      • Patterns of Enterprise Application Architecture
      • Refactoring: Improving the Design of Existing Code
  • General
    • Books
      • The Pragmatic Programmer: From Journeyman to Master
        • Don't Repeat Yourself
      • Code Complete
      • Computer Systems: A Programmer's Perspective
  • Unit Test
    • Books
      • Test Driven Development: By Example
      • Working effectively with legacy code
  • Database
    • Books
      • Use The Index, Luke
    • Articles
      • Finding and Extracting SQLServer deadlock information using Extended Events
  • Troubleshooting
    • Debugging
      • First Chance Exception
      • Symbol Files
      • Visual Studio Debugging Tricks and Tips
        • Trace Point and Conditional Break Point
        • Remote Debugging
        • Postmortem Debugging of Dump Files
        • Use DotPeek as Symbol Server
        • Use Resharper to Generate Symbol Files
        • Learn Productivity Tips and Tricks for the Debugger in Visual Studio
        • 7 lesser known hacks for debugging in Visual Studio
        • View Threads and Tasks using the Parallel Stacks Window
        • How to navigate to source code of a 3rd party library using Resharper
        • Show Parameter Values in Call Stack Window
      • WinDbg
      • Windows Debugging and Troubleshooting
      • Mysteries of Memory Management Revealed,with Mark Russinovich
      • Malware Hunting with the Sysinternals Tools
    • Books
      • Advanced Windows Debugging
      • Advanced .NET Debugging
    • Tools
      • DotNet Decompilers
      • Fiddler
        • Configure Fiddler to Decrypt HTTPS Traffic
        • How to monitor web requests from localhost to localhost using Fiddler
      • WireShark
      • System Internals
        • Handle
        • ProcessMonitor
        • ProcessExp
        • RAMMap
      • PostMan
        • Postman AWS Signature Auth
      • Asmspy
  • CSharp
    • Books
      • Advanced .NET Debugging
      • CLR via C#
      • C# in Depth
    • Articles
      • Async/Await
        • There is no thread for Async I/O
        • Async/Await - Best Practices in Asynchronous Programming
      • Rethrow Exception
      • Different effects of bindingRedirect
      • About Messages and Message Queues
      • Directory.Build.props
      • Memory Limits in a .NET Process
      • Prefer Timespan
      • Document Outline View
  • Practical Git via GitExtensions
  • Misc
    • Books
    • Articles
      • Floating Point Accuracy
      • The Absolute Minimum about Unicode
      • Postfix/Prefix increment operator
      • How A Typo Screwed Up One Of History's Worst Video Games
  • UI/UX
    • Books
      • About Face: The Essentials of Interaction Design
  • Front End
    • Books
      • Stylin’ with CSS: A Designer’s Guide
    • Articles
      • Introduction to Basic CSS Selectors
      • How Browser Works
  • Productivity
    • Tools
      • Everything
      • ConEmu
      • Vim
      • Bash
        • Navigating Bash History with Ctrl+R
      • Customise Your Powershell
    • Books
      • Mastering Regular Expression
    • Text-Editing Keyboard Shortcuts
  • System
    • Windows Message Queue
    • Mysteries of Memory Management Revealed,with Mark Russinovich
Powered by GitBook
On this page
  • Connectivity to the Remote Machine
  • Remote Debugging Agent
  • Run the Target Application
  • Debug in Visual Studio

Was this helpful?

  1. Troubleshooting
  2. Debugging
  3. Visual Studio Debugging Tricks and Tips

Remote Debugging

PreviousTrace Point and Conditional Break PointNextPostmortem Debugging of Dump Files

Last updated 6 years ago

Was this helpful?

Sometimes you own PC may not have the environment (e.g. hardware) to debug an application, in this case you may want to debug the application running on another device.

In summary you'll need the debugger on your local machine, an debugger agent on the remote machine. You can debug Native C++, Managed .NET code, and also mixed projects.

Connectivity to the Remote Machine

Make sure your PC can connect to the remote machine over network, so can Visual Studio.

Remote Debugging Agent

Install Remote Tools for Microsoft Visual Studio 2013(Assuming Visual Studio 2013 is used for debugging) on the remote machine.

Once installed, you should be able to find it from the start menu:

Now right click and run the Remote Debugger as admin, and select the Tools -> Options menu to configure the authentication.

Here I'm using No Authentication as security is not a concern and I'm going to use the agent for a very short time in intranet.

You may also want to increase the idle time otherwise the agent will stop working after the idle time.

Run the Target Application

  • Compile your code, better to use debug version, but release version (code optimized) with PDB is also OK if you have no choice for example the application only crashes in release mode

  • Copy assembly to the target machine

  • Start the application as you normally do

Debug in Visual Studio

Back to your local machine, open Visual Studio and the solution of the code of course.

  • Select theDebug -> Attach To Process

  • SelectRemote (no authentication)(up to the Authentication method you've configured previously) as the Transport, put the IP of the remote machine into theQualifiertext box (e.g 172.16.10.61) and press theRefreshbutton. You need to tick the Show processes from all users if the application was started by another user rather than the one who started the remote debug agent.

  • Select application from the list and press the Attach to start debugging

Version:0.9 StartHTML:0000000221 EndHTML:0000001057 StartFragment:0000000257 EndFragment:0000001021 SourceURL:

https://helixleisure.atlassian.net/wiki/spaces/EM/pages/166363307/Debugging+Remotely+using+Visual+Studio