Skip to content

Instantly share code, notes, and snippets.

@dxball
Last active December 7, 2018 09:01
Show Gist options
  • Save dxball/89adc6127c9242315959464f4b262bd6 to your computer and use it in GitHub Desktop.
Save dxball/89adc6127c9242315959464f4b262bd6 to your computer and use it in GitHub Desktop.
Mono remote debug

Windows side

  • Install VcXsrv
  • Install WSL (Ubuntu)
  • Win+R, enter ubuntu
  • open vcxsrv (XLanuch)

WSL

  • set display variable
export DISPLAY=127.0.0.1:0
  • ssh -[X|Y] user@remote
  • mono your_win_form_program.exe

Visual Studio 2017 with MonoDebugger

  • install VSMonoDebugger
  • open Visual Studio 2017
  • menu -> Mono -> Settings
    • Debug script
    export DISPLAY=[Windows PC's IP]:0
    sudo mono --debugger-agent=address=0.0.0.0:$(MONO_DEBUG_PORT),transport=dt_socket,server=y --debug=mdb-optimizations $(TARGET_EXE_FILENAME) $(START_ARGUMENTS) &
    
  • menu -> Mono -> Deploy & Debug (SSH)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment