Runing debug with local libs

Hello everybody, i have a project with 2 local libs.
After debug program already works on my PC, but there is a problem on other.
At another PC program starts, but crashing after some time ( 5-7 seconds),
I think it’s a problem with libs, because all functions which not use locla libs are working.
Anybody know what need to do to run debug including local libs?

What do you mean by local libs?

Have you handed over source code or binary to the other computer?

Do you get a stack trace?

Can you recreate a minimal program that shows the problem and push it to github for review?

local libs - packeges, with functions that make some queries and return information, in main project the added like
import (
DB “./pkg/GetOidbyObject”

  1. I just take .exe file and handed it to another PC without golang platform
  2. No, I can’t get any stack trace, because in my working PC program works good.

Ask your client/friend/the person that complains about not running code, to give you all output that occurs when it crashes. Also you could try to recreate on a VM.

The structure feels quite odd and I’m wondering that this compiles at all. You should make a proper go package from it, residing in the workspace. Your are locally importing vendored packages, that really smells like it has to break, but I tought it will happen during compilation because of mixing import styles…

About output, there are no information about crashing, a create some println functions to see where programm crashing, and it works befor start use function from local packeges.

VSCode compile project with this project witout problems, and after console command go build, it makes me .exe, that works in my PC. Before include packages in project i tested it, and threre are no any mistakes.
May be it’s VSCode problem, may be i need to install another development environment? If yes, can you give advice about dev enviroment.

VSCode compile project with this packages witout problems,

P.S> Sory about my mistakes in text!

Dumb question maybe, but what about the files in the config directory? Don’t they have to be passed along together with the binary?

Of course, you are right, I handed it with binary to directory on remote PC already.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.