function attachTo(item: ProcessItem) {
	const config: any = {
		type: 'node',
		request: 'attach',
		name: `process ${item.pid}`
	};

	let matches = DEBUG_FLAGS_PATTERN.exec(item.cmd);
	if (matches && matches.length >= 2) {
		// attach via port
		if (matches.length === 4 && matches[3]) {
			config.port = parseInt(matches[3]);
		}
		config.protocol = matches[1] === 'debug' ? 'legacy' : 'inspector';
	} else {
		// no port -> try to attach via pid (send SIGUSR1)
		config.processId = String(item.pid);
	}

	// a debug-port=n or inspect-port=n overrides the port
	matches = DEBUG_PORT_PATTERN.exec(item.cmd);
	if (matches && matches.length === 3) {
		// override port
		config.port = parseInt(matches[2]);
	}

	ipcRenderer.send('vscode:workbenchCommand', { id: 'debug.startFromConfig', from: 'processExplorer', args: [config] });
}
    this.$['save-btn'].addEventListener('click', () => {
      const clients = getSelectedClients(grid)
      if (clients.length) {
        const opts = {}

        ipcRenderer.send('invoice-save', clients, this.getInvoiceData(), opts)
      }
    })
Example #3
0
function okay(){
    ipcRenderer.send('color-okay', {
        gameObjectId: gameObjectId,
        componentId: componentId,
        propertyName: propertyName,
        hexColor: selectedColor.hex
    });
}
Example #4
0
export const backendMiddleware: Middleware = <AppState>(store: MiddlewareAPI<AppState>) => (next: Dispatch<AppState>) => (originalAction: any) => {
    const result = next(originalAction);
    const action: AppAction = originalAction as any;

    ipcRenderer.send('action', [store.getState(), action]);

    return result
}
function navigatePaymentUrl(payload: string) {
    const settings = getSettings();
    Electron.ipcRenderer.send("createCheckoutWindow", {
        payload: payload,
        settings: settings,
        serviceUrl: Emulator.serviceUrl
    });
}
Example #6
0
function okay(value: string) {
    ipcRenderer.send('selector-okay', {
        gameObjectId: gameObjectId,
        componentId: componentId,
        propertyName: propertyName,
        value: value
    });
}
Example #7
0
File: app.ts Project: rhysd/Tui
    constructor(private readonly config: Config) {
        this.switchTo(this.getFirstScreenName());

        // After hiding window, <webview> loses its focus.
        // So when window is shown again, need to give <webview> focus again.
        // Note:
        // remove.getCurrentWindow().on('focus', ...) is unavailable
        // because callback remains after this web contents reloaded.
        // Remained callback causes a 'trying to send message to removed web contents'
        // error.
        ipc.on('tuitter:window-focused', () => this.wv.focus());
        ipc.on('tuitter:menu:new-tweet', () => this.wv.sendIpc('tuitter:new-tweet'));
        ipc.on('tuitter:will-suspend', (__: any, threshold: number) => {
            log.debug('Refresh app because system will be suspended. Threshold:', threshold, this.wv);
            this.wv.sendIpc('tuitter:will-suspend', threshold);
        });
    }
Example #8
0
 (e: any, webContentsId: number) => {
   let sent = false;
   for (const page of store.pagesStore.pages) {
     if (
       page.webview.getWebContents() &&
       page.webview.getWebContents().id === webContentsId
     ) {
       const tab = store.tabsStore.getTabById(page.id).getApiTab();
       ipcRenderer.send('get-tab-by-web-contents-id', tab);
       sent = true;
       break;
     }
   }
   if (!sent) {
     ipcRenderer.send('get-tab-by-web-contents-id', {});
   }
 },
 getUser(user:User) {
   ipcRenderer.send('getUser', user)
    return new Promise<User>((resolve, reject) => {
      ipcRenderer.once('user-reply', (event, arg) => {
        resolve(arg);
      });
   });
 }
function navigateOAuthUrl(url: string) {
    const settings = getSettings();
    Electron.ipcRenderer.send("createOAuthWindow", {
        url: url,
        settings: settings,
        serviceUrl: Emulator.serviceUrl
    });
}