Comments (28)
Thanks for the advice.
I'd like to release the modified version as soon as possible.
from vscode.printcode.
I have the same issue. I solve this issue by setting printcode.disableTelemetry
to true
, since accessing Google is very slow from where I live. And by doing this, PrintCode works well with safari.
from vscode.printcode.
What are web browsers using?
Other than Chrome it may not work.
try specifying Chrome with printcode.browserPath
on the setting page.
from vscode.printcode.
I'm on a mac and have the same problem. It opens in chrome but there is nothing to print.
from vscode.printcode.
When it is not displayed even in Chrome,
There is a possibility that another program is disturbing. In that case, it may be displayed by changing the webServerPort from 3000 to another port (eg 3001) by setting.
Also, is DevTools displaying an error? Or, is HTML properly created? Please also check about.
Thank you and best regards,
from vscode.printcode.
On next release, the default port should probably be changed to a not so commonly used one. 3000 is default port for many development servers and quite many code examples from the net use it, so the chance of overlapping is quite high.
from vscode.printcode.
I don't have a Mac but I trust PR #7 will fix this issue.. ..and will help people with other platforms, too. Would you verify this, @atc100 or @DaddyOh .
from vscode.printcode.
I am getting a similar issue: the web browser page is blank. I did see it work once so not sure how this happens. The js console shows the errors:
In case the image doesn't come through, it's complaining that it can't find codemirror.js.
PS: I tried with both Safari and Chrome - both opened a window successfully, but had same issue with codemirror.js
Hope this helps - would love to have this capability.
from vscode.printcode.
@rodbutters
I have similar issues, where the page just was blank and the console is complaining about codemirror.js.
In the dev tools network tab there is a net::ERR_CONTENT_LENGTH_MISMATCH for codemirror.js.
But not all the time. When I reload the page it sometimes displays. Looks like a runtime error, which in my case happens more often than not.
So my temporary solution is to relaod [CMD+R] until the page shows.
from vscode.printcode.
@webwb
Tried your refresh work-around, but never managed to see code. I believe you that it works because I did see the code one time, but never since.
I would love to take a look and see if I can fix, but up against some tight deadlines right now.
Will watch this space and hope someone else can get to the bottom of this.
from vscode.printcode.
@rodbutters You can try this: Press β₯β+I, opening developing tools, then switch to Elements
tab,
,
expand the <script>
dom element, and then click on the code, then press β+R (refresh the page).
Now the print dialog will immediately pop up.
It works on both of my two MacBooks, macOS High Sierra, 10.13.4
from vscode.printcode.
It seems that 100 ms is somewhat shorter depending on the environment.
Would you solve it if it is a little longer? About 500 ms?
I do not want to be too long.
https://github.com/nobuhito/vscode.printcode/blob/master/src/extension.js#L54-L56
from vscode.printcode.
Or is this better?
server.listen(port, () => {
portNumberInUse = port;
printIt();
});
from vscode.printcode.
I experimented with different values with different systems when developing, and 100 ms seemed to give enough margin, but other systems seem to require more. Even 500 ms shouldn't be too noticeable for users, either. If you decide to keep the delay, we can of course create one more config variable for it.
from vscode.printcode.
If it improves by changing to 500 ms or 1 sec, I will change the default value. However, I do not want to extend it until 2 sec.
Also, I want to minimize the setting items as much as possible.
from vscode.printcode.
Has there been any progress? I'd love to use this extension on OS X.
from vscode.printcode.
I am having the same problem. Has there been any progress?
It's a very important extension.
from vscode.printcode.
Same problem with codemirror.js here.
from vscode.printcode.
Hello everyone
It may have been fixed in Ver.3.0.0, please update and try again.
I am waiting for the result report.
from vscode.printcode.
I installed version 3.0, but I'm still getting a blank window on OS X.
from vscode.printcode.
Same here. Still missing codemirror
from vscode.printcode.
It doesn't fix the bug.
from vscode.printcode.
Hmm ...
I am thinking of two countermeasures
- Lazy access
- Starting and running the web server
Which is better?
from vscode.printcode.
Try restarting Chrome(Ver. 69.0.3497.100). I had same problem under Windows 10 using Chrome. Solution was to exit Chrome and then from Visual Code(Ver. 1.28.2) do PrintCode again. This time print dialog box showed up without being empty. Has worked great since restarting Chrome.
from vscode.printcode.
I ended up solving this by modifying the source code to pull codemirror from a CDN (https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.41.0/) as opposed to using the local modules. I will generate a pull request for this
from vscode.printcode.
Just wanted to confirm that the problem still exists. I am using Mojave on a 2013 Macbook Pro with Safari. I tried to configure printCode to use Chrome, but then no browser opens at all.
Using a different port has no effect.
My solution now is to hit CMD-R as often as it takes to show the print-dialogue.
from vscode.printcode.
printcode.disableTelemetry
did not help me. It prints, but only black-and-white, though with line numbers. No syntax highlighting whatsoever.
from vscode.printcode.
I got Uncaught TypeError: Cannot read property 'propertyKeywords' of undefined
when print sass
files. any help?
from vscode.printcode.
Related Issues (20)
- Can I print the whole project or all special type of scripts in directory ? HOT 1
- When choosing "PrintCode" from the F1 menu, I just get a new web page saying "site cannot be reached".
- Word Wrap HOT 2
- When code is longer than 1 page - line numbers do not print, only at the last page
- Print mode for shell scripts does not work
- Prints in Black and White only HOT 5
- Unable to print: No permission to use port undefined. HOT 3
- Link the markdown- color syntax
- π₯Can I print all files at once? HOT 1
- Print from 2nd instance of vscode
- Cannot use in remote-containers HOT 1
- How to add stylesheets? HOT 1
- Printed scrollbar covers last line on page
- Include project name and relative file path in output
- Missing line number on fist page. HOT 2
- Browser does not open in WSL HOT 1
- VSCODE Dark theme in print
- There is no matching command
- Command 'Printing: Print content of folder' resulted in an error (Cannot read properties of undefined (reading 'scheme'))
- Deprecated extension? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.printcode.