Giter Site home page Giter Site logo

Comments (28)

nobuhito avatar nobuhito commented on August 26, 2024 1

Thanks for the advice.
I'd like to release the modified version as soon as possible.

from vscode.printcode.

gaochenyi avatar gaochenyi commented on August 26, 2024 1

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.

nobuhito avatar nobuhito commented on August 26, 2024

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.

DaddyOh avatar DaddyOh commented on August 26, 2024

I'm on a mac and have the same problem. It opens in chrome but there is nothing to print.

from vscode.printcode.

nobuhito avatar nobuhito commented on August 26, 2024

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,

2018-03-11 11 10 28

from vscode.printcode.

janilahti avatar janilahti commented on August 26, 2024

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.

janilahti avatar janilahti commented on August 26, 2024

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.

rodbutters avatar rodbutters commented on August 26, 2024

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:

screenshot

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.

webwb avatar webwb commented on August 26, 2024

@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.

rodbutters avatar rodbutters commented on August 26, 2024

@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.

yzhang37 avatar yzhang37 commented on August 26, 2024

@rodbutters You can try this: Press βŒ₯⌘+I, opening developing tools, then switch to Elements tab,
Element 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.
Print dialog

It works on both of my two MacBooks, macOS High Sierra, 10.13.4

from vscode.printcode.

nobuhito avatar nobuhito commented on August 26, 2024

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.

nobuhito avatar nobuhito commented on August 26, 2024

Or is this better?

server.listen(port, () => {
  portNumberInUse = port;
  printIt();
});

from vscode.printcode.

janilahti avatar janilahti commented on August 26, 2024

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.

nobuhito avatar nobuhito commented on August 26, 2024

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.

DanielSWolf avatar DanielSWolf commented on August 26, 2024

Has there been any progress? I'd love to use this extension on OS X.

from vscode.printcode.

srgbrito avatar srgbrito commented on August 26, 2024

I am having the same problem. Has there been any progress?
It's a very important extension.

from vscode.printcode.

rgreen13 avatar rgreen13 commented on August 26, 2024

Same problem with codemirror.js here.

from vscode.printcode.

nobuhito avatar nobuhito commented on August 26, 2024

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.

DanielSWolf avatar DanielSWolf commented on August 26, 2024

I installed version 3.0, but I'm still getting a blank window on OS X.

from vscode.printcode.

rgreen13 avatar rgreen13 commented on August 26, 2024

Same here. Still missing codemirror

from vscode.printcode.

srgbrito avatar srgbrito commented on August 26, 2024

It doesn't fix the bug.

from vscode.printcode.

nobuhito avatar nobuhito commented on August 26, 2024

Hmm ...

I am thinking of two countermeasures

  • Lazy access
  • Starting and running the web server

Which is better?

from vscode.printcode.

true2thepen avatar true2thepen commented on August 26, 2024

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.

rgreen13 avatar rgreen13 commented on August 26, 2024

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.

tomkarp avatar tomkarp commented on August 26, 2024

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.

mouse07410 avatar mouse07410 commented on August 26, 2024

printcode.disableTelemetry did not help me. It prints, but only black-and-white, though with line numbers. No syntax highlighting whatsoever.

from vscode.printcode.

seksitha avatar seksitha commented on August 26, 2024

I got Uncaught TypeError: Cannot read property 'propertyKeywords' of undefined when print sass files. any help?

from vscode.printcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.