Skip to content

[QUESTION] How to enable debug logging of the extension to #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wvanmourik-uwv opened this issue Feb 18, 2025 · 4 comments
Open

[QUESTION] How to enable debug logging of the extension to #397

wvanmourik-uwv opened this issue Feb 18, 2025 · 4 comments
Labels
question Further information is requested

Comments

@wvanmourik-uwv
Copy link

Problem situation:
I have several git repositories with Robot Framework setups in them. In these I can succesfully work with the Robotcode extension.
Recently I inherited another git repo (with a robot framework setup in it) from a colleague and this one causes an odd issue:
after opening a .robot file, the play/debug button in the gutter bar appears for a short while (~1sec), but then disappears indefinitely (until closing and reopening the file, but disappears again).
This makes debugging tests impossible. (I can still run tests from this repo succesfully with robot from the cli)

Question:
Is there a way to enable logging from the extension to become aware of why the extension fails (to stay connected to the .robot files)?

Extra info:
Another colleague does not experience this issue with this repo with the same versions of VSCode and the extension, so it is puzzling what is different on my end.
The repo contains about 180 .robot files and there are about 775 problems in them, such as undeclared (declared in other files) variables and circular dependencies. I doubt these are too blame.

**Versions used: **

  • VS Code Version [1.94.2]
  • RobotCode Version [0.109.1]
  • OS: [Windows]
  • Python Version [3.9.10]
  • RobotFramework Version [7.0.1]
@wvanmourik-uwv wvanmourik-uwv added the question Further information is requested label Feb 18, 2025
@wvanmourik-uwv
Copy link
Author

I have already looked at, from the robotcode menu:
Enabled debug logging
Looked at the log
Looked at the language server log

But I don't see any errors or warnings that hint at a concise issue.

Perhaps debugging the extension code is the only way?

@d-biehl
Copy link
Member

d-biehl commented Feb 28, 2025

Do you experience the same behavior with every file in the project, or only with one file?

Sometimes the error appears in the Test Explorer view. Are tests listed there? If an error occurs in a specific file, an error node is added. You can open the project without opening any files, then switch to the Test Explorer and open a file or test from there to see what happens.

Also, please note that no extra log is generated for test discovery—the output is shown in the Output view under the "RobotCode" entry.

I recommend comparing your VSCode configuration for both your workspace and your user settings.

@wvanmourik-uwv
Copy link
Author

wvanmourik-uwv commented Mar 6, 2025

Do you experience the same behavior with every file in the project, or only with one file?

Same behaviour for all .robot files in this repo

Sometimes the error appears in the Test Explorer view. Are tests listed there?

Yes, all tests appear there. From there I can run and debug tests just fine.

If an error occurs in a specific file, an error node is added.

Not sure what you mean? I don't see errors in the Test Explorer View, if that is what you meant.

I recommend comparing your VSCode configuration for both your workspace and your user settings.

Indeed. We are both on pretty much default settings for all extentions and settings. so this puzzle is odd.

The repo still has about 6k of robocop warnings/infos. I am slowly trying to get rid of those in the hope of one of those being the issue for me.
If I ever figure it out, I'll update this post.

@d-biehl
Copy link
Member

d-biehl commented Mar 13, 2025

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants