mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 12:08:36 -05:00
Merge from vscode 1ce89e2cb720d69c496c2815c4696ee4fd4429a6 (#6779)
* Merge from vscode 1ce89e2cb720d69c496c2815c4696ee4fd4429a6 * redisable accounts because of issues
This commit is contained in:
@@ -144,7 +144,8 @@ export class CallStackView extends ViewletPanel {
|
||||
|
||||
return nls.localize('showMoreStackFrames2', "Show More Stack Frames");
|
||||
}
|
||||
}
|
||||
},
|
||||
expandOnlyOnTwistieClick: true
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService.getModel()).then(undefined, onUnexpectedError);
|
||||
@@ -576,7 +577,7 @@ function isDebugModel(obj: any): obj is IDebugModel {
|
||||
}
|
||||
|
||||
function isDebugSession(obj: any): obj is IDebugSession {
|
||||
return typeof obj.getAllThreads === 'function';
|
||||
return obj && typeof obj.getAllThreads === 'function';
|
||||
}
|
||||
|
||||
function isDeemphasized(frame: IStackFrame): boolean {
|
||||
@@ -608,6 +609,10 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
|
||||
} else if (isDebugSession(element)) {
|
||||
const childSessions = this.debugService.getModel().getSessions().filter(s => s.parentSession === element);
|
||||
const threads: CallStackItem[] = element.getAllThreads();
|
||||
if (threads.length === 1 && childSessions.length === 0) {
|
||||
// Do not show thread when there is only one to be compact.
|
||||
return this.getThreadChildren(<Thread>threads[0]);
|
||||
}
|
||||
|
||||
return Promise.resolve(threads.concat(childSessions));
|
||||
} else {
|
||||
|
||||
@@ -35,19 +35,23 @@ class ToggleBreakpointAction extends EditorAction {
|
||||
}
|
||||
|
||||
public run(accessor: ServicesAccessor, editor: ICodeEditor): Promise<any> {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
|
||||
const position = editor.getPosition();
|
||||
if (editor.hasModel() && position) {
|
||||
if (editor.hasModel()) {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
const modelUri = editor.getModel().uri;
|
||||
const bps = debugService.getModel().getBreakpoints({ lineNumber: position.lineNumber, uri: modelUri });
|
||||
const canSet = debugService.getConfigurationManager().canSetBreakpointsIn(editor.getModel());
|
||||
// Does not account for multi line selections, Set to remove multiple cursor on the same line
|
||||
const lineNumbers = [...new Set(editor.getSelections().map(s => s.getPosition().lineNumber))];
|
||||
|
||||
if (bps.length) {
|
||||
return Promise.all(bps.map(bp => debugService.removeBreakpoints(bp.getId())));
|
||||
}
|
||||
if (debugService.getConfigurationManager().canSetBreakpointsIn(editor.getModel())) {
|
||||
return debugService.addBreakpoints(modelUri, [{ lineNumber: position.lineNumber }], 'debugEditorActions.toggleBreakpointAction');
|
||||
}
|
||||
return Promise.all(lineNumbers.map(line => {
|
||||
const bps = debugService.getModel().getBreakpoints({ lineNumber: line, uri: modelUri });
|
||||
if (bps.length) {
|
||||
return Promise.all(bps.map(bp => debugService.removeBreakpoints(bp.getId())));
|
||||
} else if (canSet) {
|
||||
return (debugService.addBreakpoints(modelUri, [{ lineNumber: line }], 'debugEditorActions.toggleBreakpointAction'));
|
||||
} else {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
|
||||
@@ -175,7 +175,7 @@ export class DebugSession implements IDebugSession {
|
||||
|
||||
return this.raw!.initialize({
|
||||
clientID: 'vscode',
|
||||
clientName: this.productService.productConfiguration.nameLong,
|
||||
clientName: this.productService.nameLong,
|
||||
adapterID: this.configuration.type,
|
||||
pathFormat: 'path',
|
||||
linesStartAt1: true,
|
||||
|
||||
@@ -17,7 +17,7 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
||||
|
||||
constructor(
|
||||
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
|
||||
//@IWindowService windowService: IWindowService,
|
||||
// @IWindowService windowService: IWindowService, // TODO@weinand TODO@isidorn cyclic dependency?
|
||||
@IEnvironmentService environmentService: IEnvironmentService
|
||||
) {
|
||||
const connection = remoteAgentService.getConnection();
|
||||
@@ -30,13 +30,11 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
||||
|
||||
this._register(this.onReload(event => {
|
||||
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
|
||||
//windowService.reloadWindow();
|
||||
window.location.reload();
|
||||
}
|
||||
}));
|
||||
this._register(this.onClose(event => {
|
||||
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
|
||||
//this._windowService.closeWindow();
|
||||
window.close();
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { env as processEnv } from 'vs/base/common/process';
|
||||
|
||||
/**
|
||||
* This interface represents a single command line argument split into a "prefix" and a "path" half.
|
||||
@@ -594,10 +595,7 @@ export class RawDebugSession {
|
||||
let env: IProcessEnvironment = {};
|
||||
if (vscodeArgs.env) {
|
||||
// merge environment variables into a copy of the process.env
|
||||
if (typeof process === 'object' && process.env) {
|
||||
env = objects.mixin(env, process.env);
|
||||
}
|
||||
env = objects.mixin(env, vscodeArgs.env);
|
||||
env = objects.mixin(processEnv, vscodeArgs.env);
|
||||
// and delete some if necessary
|
||||
Object.keys(env).filter(k => env[k] === null).forEach(key => delete env[key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user