VSCode markdown preview blank on launch from command line (code .)

Viewed 691
  1. Problem description: When launching /Docs folder containing markdown files using code . from the command line into VSCode, the files fail to render using markdown preview button. The previw window opens and is blank. When I open VSCode from windows menu, preview button works fine and renders all content for markdown files.
  2. I have tried:
    • Problem is persistent across Windows 10 and Windows 11 OS.
    • If I open VSCode from file explorer or Windows menu, the markdown content renders using preview.
    • If I open VSCode using code ., the preview button fails to render markdown content and displays blank preview window.
    • If I launch from the command line using code, render also seems to fail.
  3. Just looking for confirmation if this is a known issue? Would like to be able to launch from cmd and have markdown preview still work.
1 Answers

I found some more information so I'll make it an answer - this is a known issue in Visual Studio Code and is being tracked with: https://github.com/microsoft/vscode/issues/122951

There are two work arounds:

  1. Launch Visual Studio Code unelevated
  2. Use the --no-sandbox argument
Related