Ticket Created
over 3 years ago

CIQQA-753

VS Code plugin can run the wrong PRG file if multiple PRGs exist in the bin/ directory

- Windows 10

- Visual Studio Code 1.62.3

- Monkey C Extension 1.0.0

- SDK: 4.0.6

If multiple PRGs exist in the bin/ directory, VS Code will run the first one (in alphabetical order), which may not be the actual PRG that belongs to the project. This can cause problems if a new project is created by copying an existing project which has already been built once. Seems like it would also cause a problem if the project folder is renamed.

Recreation procedure:

- Create simple data field app in a folder called TESTA, which just returns "TESTA" in compute()

- Build app and note that TESTA.PRG is created. Run app and verify that it works as expected

- Copy project folder, and change the new folder name to TESTB. Change compute() to return "TESTB"

- Build app and note that TESTB.PRG is created. Run app and note that it's actually TESTA which runs.

- Delete TESTA.PRG from TESTB/bin, and run TESTB again. Note that TESTB runs now.

Parents
  • Thanks for the reply!

    I've seen the launch config and your analysis sounds plausible, but I've seen this problem with more than one project. And there was a forum post by someone who had copied their project folder to start a new project, and had issues where it seemed that the old binary was being run (which sounds similar to or the same as this problem).

    Unfortunately I can't recreate it this second, but I'll give it another shot when I have more free time.

    I will note that I use CTRL-F5 to run my app and at the time I don't think I had a launch.json configuration.

Comment
  • Thanks for the reply!

    I've seen the launch config and your analysis sounds plausible, but I've seen this problem with more than one project. And there was a forum post by someone who had copied their project folder to start a new project, and had issues where it seemed that the old binary was being run (which sounds similar to or the same as this problem).

    Unfortunately I can't recreate it this second, but I'll give it another shot when I have more free time.

    I will note that I use CTRL-F5 to run my app and at the time I don't think I had a launch.json configuration.

Children
No Data