Skip to content
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

.gcode Generated by Prusa Slicer Not Recognized #23

Closed
nverdonk opened this issue Apr 13, 2021 · 14 comments
Closed

.gcode Generated by Prusa Slicer Not Recognized #23

nverdonk opened this issue Apr 13, 2021 · 14 comments
Assignees
Labels
archived Archived and locked issues feature New feature or request

Comments

@nverdonk
Copy link

Describe the bug
G-Code files produced by PrusaSlicer are not recognized or highlighted by extension. They are .gcode file extensions.

To Reproduce
Steps to reproduce the behavior:

  1. Generate G-Code file using PrusaSlicer
  2. Save file to Desktop
  3. Open file in VS Code
  4. Confirm file is not recognized as G-Code

Expected behavior
Expect the file type to be recognized and highlighted properly. VS code seems to recognize that it is a gcode language but extension does not (see screenshot below),

Screenshots
SNAG-0044

Environment / Version:

  • OS Version: Windows 10
  • VSCode Version: 1.55.2
  • Extension Version: v0.5.1

Additional context
I might be missing a step in the process here as the extension is working properly if I make a blank .gcode file and type some commands in.
I have also copied all the text from the PrusaSlicer generated file and pasted into the user-made file and correct highlighting occurs

Let me know if this should be moved, tagged, or deleted.

@mikecentola mikecentola added the bug Something isn't working label Apr 14, 2021
@mikecentola mikecentola self-assigned this Apr 14, 2021
@mikecentola
Copy link
Member

@nverdonk can you attach the file here so I can try it on my computer with the current dev version?

@nverdonk
Copy link
Author

@mikecentola Yes, here is a file to play around with. I just sliced it now and confirmed the same issue is occurring.

Had to ZIP it as GitHub won't allow native upload of .gcode
Drive Gear.zip

@mikecentola
Copy link
Member

@nverdonk I'm on it!

@BelKed
Copy link

BelKed commented Apr 14, 2021

Visual Studio Code does not colorise that big files...
Error
You can enable it by clicking on "Forcefully Enable Features" or in settings – editor.largeFileOptimizations

@mikecentola
Copy link
Member

@nverdonk yup @belkid is correct. I got the same error

image

@nverdonk
Copy link
Author

Highlighting Fixed

Toggling editor.largeFileOptimizations corrected the highlighting issue, but the G-Code Tree from the extension still claimed to not recognize the G-Code file.

This time, however, a loading bar showed up; perhaps the file is too large for the tree as well?
gcode_tree

@mikecentola mikecentola added help wanted Extra attention is needed and removed bug Something isn't working labels Apr 14, 2021
@mikecentola
Copy link
Member

@nverdonk Could be because the file is so large. Let me do some investigating on that side as well.

@nverdonk
Copy link
Author

@mikecentola @BelKed Thank you for such quick responses and help!

@mikecentola I believe the file size is the issue with the tree. I deleted pretty much the whole file (~550,000 lines to 374 lines) and the tree loads correctly now.
image

The tree would be so cumbersome for a file of that size anyway; don't think this will ruin anyone's workflow :), just wanted to make sure it wasn't a bug.

@mikecentola
Copy link
Member

No worries. I wonder if I should add a detection for large files to not even try if it's over a certain size.

@nverdonk
Copy link
Author

I think adding note or warning along the lines of

This file exceeds maximum readable file size of _____ MB. VS Code might disable highlighting and GCODE tree will not generate

would help catch people in my situation in the future.

@mikecentola
Copy link
Member

@nverdonk yeah for sure. I'll see if I can find somewhere to add it. I'm working on the hover code right now.

@mikecentola mikecentola added feature New feature or request and removed help wanted Extra attention is needed labels Apr 15, 2021
@mikecentola
Copy link
Member

I added a warning popup for anything over 10K lines when autoRefresh is enabled.

@nverdonk
Copy link
Author

I think that's a great addition and will save people a lot of headache in the future! I'll close out the issue for now and we can reopen if needed.

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This issue has been automatically locked since there has not been any recent activity after it was close. Please open a new issue for related topics.

@github-actions github-actions bot added the archived Archived and locked issues label Aug 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived and locked issues feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants