How to use the vscode-jsonrpc.Trace.Verbose function in vscode-jsonrpc

To help you get started, we’ve selected a few vscode-jsonrpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yakindu / solidity-ide / extensions / vscode / src / extension.ts View on Github external
run : { command: script },
        debug: { command: script, args: [], options: {env: createDebugEnv()} }
    };
    
    let clientOptions: LanguageClientOptions = {
        documentSelector: ['Solidity'],
        synchronize: {
            fileEvents: workspace.createFileSystemWatcher('**/*.*')
        }
    };
    
    // Create the language client and start the client.
    let lc = new LanguageClient('Solidity Language Server', serverOptions, clientOptions);
      
    // enable tracing (.Off, .Messages, Verbose)
    lc.trace = Trace.Verbose;
    let disposable = lc.start();
    
    // Push the disposable to the context's subscriptions so that the 
    // client can be deactivated on extension deactivation
    context.subscriptions.push(disposable);
}
function createDebugEnv() {
github microsoft / vscode-azurearmtools / src / languageclient / startArmLanguageClient.ts View on Github external
export function startArmLanguageClient(context: ExtensionContext): void {
    // The server is implemented in node // TODO:
    // let serverExe = 'dotnet';

    let serverExe = 'C:\\Users\\stephwe\\Repos\\arm-language-server\\arm-language-server\\bin\\Debug\\netcoreapp2.2\\win-x64\\arm-language-server.exe';
    let serverDll = 'C:\\Users\\stephwe\\Repos\\arm-language-server\\arm-language-server\\bin\\Debug\\netcoreapp2.2\\arm-language-server.dll';
    serverExe = 'c:\\Users\\stephwe\\.dotnet\\x64\\dotnet.exe';

    // let serverExe = context.asAbsolutePath('D:/Development/Omnisharp/omnisharp-roslyn/artifacts/publish/OmniSharp.Stdio/win7-x64/OmniSharp.exe');
    // The debug options for the server
    // let debugOptions = { execArgv: ['-lsp', '-d' };5

    // If the extension is launched in debug mode then the debug server options are used
    // Otherwise the run options are used
    let serverOptions: ServerOptions = {
        run: { command: serverExe, args: [serverDll, '-lsp', '--debug', '--logLevel', getLogLevelString(Trace.Verbose)] }, //TODO:
        debug: { command: serverExe, args: [serverDll, '-lsp', '--debug', '--logLevel', getLogLevelString(Trace.Verbose)] } // TODO:         let debugOptions = { execArgv: ['--nolazy', '--debug=6005', '--inspect'] };
    };

    // Options to control the language client
    let clientOptions: LanguageClientOptions = {
        // Register the server for plain text documents
        documentSelector: [
            {
                pattern: '**/*.json',
                // TODO: { language: 'arm-deployment', scheme: 'file' },
                // TODO:  { language: 'arm-deployment', scheme: 'untitled' }
            }
        ],
        synchronize: {
            // Synchronize the setting section 'languageServerExample' to the server
            // TODO: configurationSection: 'languageServerExampleTODO',
github cdietrich / xtext-languageserver-example / vscode-extension-self-contained / src / extension.ts View on Github external
let lc = new LanguageClient('Xtext Server', serverOptions, clientOptions);
    
    var disposable2 =commands.registerCommand("mydsl.a.proxy", async () => {
        let activeEditor = window.activeTextEditor;
        if (!activeEditor || !activeEditor.document || activeEditor.document.languageId !== 'mydsl') {
            return;
        }

        if (activeEditor.document.uri instanceof Uri) {
            commands.executeCommand("mydsl.a", activeEditor.document.uri.toString());
        }
    })
    context.subscriptions.push(disposable2);
    
    // enable tracing (.Off, .Messages, Verbose)
    lc.trace = Trace.Verbose;
    let disposable = lc.start();
    
    // Push the disposable to the context's subscriptions so that the 
    // client can be deactivated on extension deactivation
    context.subscriptions.push(disposable);
}
github cdietrich / xtext-languageserver-example / vscode-extension / src / extension.ts View on Github external
var disposable2 =commands.registerCommand("mydsl.a.proxy", async () => {
        let activeEditor = window.activeTextEditor;
        if (!activeEditor || !activeEditor.document || activeEditor.document.languageId !== 'mydsl') {
            return;
        }

        if (activeEditor.document.uri instanceof Uri) {
            commands.executeCommand("mydsl.a", activeEditor.document.uri.toString());
        }
    })

    context.subscriptions.push(disposable2);

    // enable tracing (.Off, .Messages, Verbose)
    lc.trace = Trace.Verbose;
    let disposable = lc.start();
    
    // Push the disposable to the context's subscriptions so that the 
    // client can be deactivated on extension deactivation
    context.subscriptions.push(disposable);
}
github spring-projects / sts4 / vscode-extensions / commons-vscode / src / launch-util.ts View on Github external
function setupLanguageClient(context: VSCode.ExtensionContext, createServer: ServerOptions, options: ActivatorOptions): Promise {
    // Create the language client and start the client.
    let client = new LanguageClient(options.extensionId, options.extensionId,
        createServer, options.clientOptions
    );
    client.registerProposedFeatures();
    log("Proposed protocol extensions loaded!");
    if (options.TRACE) {
        client.trace = Trace.Verbose;
    }

    let progressNotification = new NotificationType("sts/progress");
    let highlightNotification = new NotificationType("sts/highlight");
    let moveCursorRequest = new RequestType("sts/moveCursor");

    let disposable = client.start();

    const codeLensListanableSetting = options.highlightCodeLensSettingKey ? new ListenablePreferenceSetting(options.highlightCodeLensSettingKey) : undefined;

    let progressService = new ProgressService();
    let highlightService = new HighlightService();
    const codelensService = new HighlightCodeLensProvider();
    let codeLensProviderSubscription: Disposable;

    CommonsCommands.registerCommands(context);
github microsoft / vscode-azurearmtools / src / languageclient / startArmLanguageClient.ts View on Github external
pattern: '**/*.json',
                // TODO: { language: 'arm-deployment', scheme: 'file' },
                // TODO:  { language: 'arm-deployment', scheme: 'untitled' }
            }
        ],
        synchronize: {
            // Synchronize the setting section 'languageServerExample' to the server
            // TODO: configurationSection: 'languageServerExampleTODO',
            fileEvents: workspace.createFileSystemWatcher('**/*.json')
        }
    };

    // Create the language client and start the client.
    // tslint:disable-next-line:no-single-line-block-comment
    const client = new LanguageClient('arm-deployment', 'ARM Deployment Language Server', serverOptions, clientOptions, true/*asdf*/);
    client.trace = Trace.Verbose;
    // TODO: client.clientOptions.errorHandler
    let handler = client.createDefaultErrorHandler();

    try {
        let disposable = client.start();
        // Push the disposable to the context's subscriptions so that the
        // client can be deactivated on extension deactivation
        context.subscriptions.push(disposable);
    } catch (error) {
        window.showErrorMessage(
            'ARM Deployment Template Language Server failed to start unexpectedly, ' +
            'please check the output log and report an issue.'); //asdf where?

        // asdf this.telemetryReporter.reportErrorOnServerStart(error);
    }
}
github dotnet / aspnetcore-tooling / src / Razor / src / Microsoft.AspNetCore.Razor.VSCode / src / Diagnostics / ReportIssuePanel.ts View on Github external
if (this.logger.trace === Trace.Verbose) {
            panelBodyContent = `<ol>
    <li>Press <button>Start</button></li>
    <li>Perform the actions (or no action) that resulted in your Razor issue</li>
    <li>Click <button>Stop</button>. This will copy all relevant issue information.</li>
    <li><a href="https://github.com/dotnet/aspnetcore/issues/new?template=bug_report.md&amp;labels=area-razor.tooling%2C+feature-razor.vscode%2C+bug">Go to GitHub</a>, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.</li>
</ol>

<p><em>Privacy Alert! The contents copied to your clipboard may contain personal data. Prior to posting to
GitHub, please remove any personal data which should not be publicly viewable.
<a href="https://privacy.microsoft.com/en-US/privacystatement">https://privacy.microsoft.com/en-US/privacystatement</a></em></p>

<button>Copy issue content again</button>`;
        } else {
            panelBodyContent = `<p>Cannot start collecting Razor logs when <strong><em>razor.trace</em></strong> is set to <strong><em>${Trace[this.logger.trace]}</em></strong>.
Please set <strong><em>razor.trace</em></strong> to <strong><em>${Trace[Trace.Verbose]}</em></strong> and then reload your VSCode environment and re-run the report Razor issue command.</p>`;
        }

        this.panel.webview.html = `


    
    
    
    <title>Report a Razor issue</title>
    <style>
        button {
            background-color: #eff3f6;
            background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);
            color: #24292e;
            border: 1px solid rgba(27,31,35,.2);
            border-radius: .25em;</style>
github dotnet / aspnetcore-tooling / src / Razor / src / Microsoft.AspNetCore.Razor.VSCode / src / Diagnostics / ReportIssuePanel.ts View on Github external
private async update() {
        if (!this.panel) {
            return;
        }

        let panelBodyContent = '';
        if (this.logger.trace === Trace.Verbose) {
            panelBodyContent = `<ol>
    <li>Press <button>Start</button></li>
    <li>Perform the actions (or no action) that resulted in your Razor issue</li>
    <li>Click <button>Stop</button>. This will copy all relevant issue information.</li>
    <li><a href="https://github.com/dotnet/aspnetcore/issues/new?template=bug_report.md&amp;labels=area-razor.tooling%2C+feature-razor.vscode%2C+bug">Go to GitHub</a>, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.</li>
</ol>

<p><em>Privacy Alert! The contents copied to your clipboard may contain personal data. Prior to posting to
GitHub, please remove any personal data which should not be publicly viewable.
<a href="https://privacy.microsoft.com/en-US/privacystatement">https://privacy.microsoft.com/en-US/privacystatement</a></em></p>

<button>Copy issue content again</button>`;
        } else {
            panelBodyContent = `<p>Cannot start collecting Razor logs when <strong><em>razor.trace</em></strong> is set to <strong><em>${Trace[this.logger.trace]}</em></strong>.
Please set <strong><em>razor.trace</em></strong> to <strong><em>${Trace[Trace.Verbose]}</em></strong> and then reload your VSCode environment and re-run the report Razor issue command.</p>`;
        }