How to manipulate output exe before debugger starts?

Hi,

I need to perform some operations on the output exe before the debugger starts.. How can I do this with goland run configurations?

 

Thanks.

0
3 comments
Official comment

Hi Jahhai,

 

My apologies for the delay in replying to this.

Currently, the only option is to write a shell script and run that shell script and a Go Remote configuration for debugging.
I've created a sample script here https://gist.github.com/dlsniper/5549e65cb2e85d72fd8e9d2dbea4b311 which shows you how it could look like.
You can use this plugin https://plugins.jetbrains.com/plugin/4230-bashsupport to have Bash support in the IDE.

If you can provide more information on when this feature would be needed, I'm happy to raise an issue for it on our tracker, https://youtrack.jetbrains.com/issues/Go

Hope this helps.

 

 

Kind regards,
Florin

Avatar
Permanently deleted user

Hi,

 

Thanks for the response. For Windows applications it is often necessary to have an application manifest embedded (and other resources) into the exe to set certain parameters such as declaring Windows 10 support and dpi scaling awareness; such things will change the runtime behaviour of an executable.

I will give the script a try, although having to run a script then start a remote debugging session could become annoying if repeated debugging sessions are required.

 

Thanks.

0

Hi Jahhai,

 

Thank you for your reply.
I've created the following issue https://youtrack.jetbrains.com/issue/GO-5940 to track this request.
Unfortunately, since you are on Windows the above script will not work as it's meant for Unix systems.
I'm sorry I cannot provide you with a better solution for now.

 

Kind regards,
Florin

0

Please sign in to leave a comment.