Как запустить новый процесс VS Code из расширения VS Code - PullRequest
0 голосов
/ 30 октября 2019

Я хочу отсоединить процесс VS Code от расширения VS Code. Но редактор VS Code не отображается. Как показать VS Code Editor из расширения? Следующий код работает над сценарием node.js, но не работает над расширением.

    const fs = require('fs');
    const out = fs.openSync('D:\\tmp\\out.log', 'a');
    const err = fs.openSync('D:\\tmp\\err.log', 'a');
    const cp = require('child_process');

    child = cp.spawn('code', [], {
        detached: true,
        stdio: ['ignore' /* stdin */, out /* stdout */, err /* stderr */],
    });
    child.unref();

    console.log('detached');
...