forked from openmrs/openmrs-distro-referenceapplication
-
Notifications
You must be signed in to change notification settings - Fork 1
Remote Debugging Setup Instructions
ccwhite333 edited this page Jan 12, 2022
·
3 revisions
Prerequisites:
- VSCode with remote SSH plugin
- IntelliJ
- accessible SSH connection to desired server
Assumptions:
- There is an instance of iSanteplus running with debugging enabled on port 1044 (see here for instructions TBC)
Instructions:
- Open VSCode
- Connect to desired server through remote SSH plugin
- download the SSH plugin if not already
- bring up command pallet (command/ctrl+shift+p)
- write 'SSH config' and open SSH configuration file
- add entry for your ssh connection if it doesn't exist
Host alias
User ubuntu
HostName <ip-config>
- Bring up the command pallet and write 'SSH connect'
- Select 'SSH connect to host' and select the alias you just created
- When that connection succeeds, open the command pallet again and write 'forward a port' and select 'forward a port'
- It should take you to that port's tab where you can click 'forward a port' again and enter '1044'
- Note the local address that port gets forwarded to (e.g.
localhost:1044
) - Open IntelliJ
- Checkout the module that you would like to debug and open that project in Intellij
- Go to 'Run' in the menu bar and click 'Edit configurations'
- Select 'add new run configuration' and 'remote JVM debug'
- Name the configuration and update the host and port to match the forwarded port (e.g. localhost:1044)
- In the dropdown for 'use module classpath' select the top level module to use for the classpath