Goland Debugged: unused functions are not included into executable

已回答

Are there anyways for me to configure unused functions into the executable?

1
正式评论

Hello,

There is no way to include unused functions in your application. Go compiler, especially linker, strips out the unused functions.

Could you please elaborate a bit? Why do you need to debug unused functions? Probably, there is another way to resolve the issue.

One case is exploring method calls in the debugger. 

0

Pzhang Thanks for your idea.

Unfortunately, there is no way to achieve this because the Go compiler itself optimizes unused functions and GoLand (Delve) debugger can't get information about them. So, there is nothing that we can improve or add from our side. Also, there are no flags to disable this optimization.

0

请先登录再写评论。