Skip to content

Commit 6b313ce

Browse files
rchiodoluabud
authored andcommitted
Add more logging to figure out why raw kernel did not start (microsoft#14374)
* Some more logging * Some more logging
1 parent c4e2d74 commit 6b313ce

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/client/datascience/interactive-common/interactiveBase.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ export abstract class InteractiveBase extends WebviewPanelHost<IInteractiveWindo
943943
await this.ensureNotebook(serverConnection);
944944
}
945945
} catch (exc) {
946+
traceError(`Exception attempting to start notebook: `, exc);
946947
// We should dispose ourselves if the load fails. Othewise the user
947948
// updates their install and we just fail again because the load promise is the same.
948949
await this.closeBecauseOfFailure(exc);

src/client/datascience/jupyter/jupyterNotebook.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ export class JupyterNotebookBase implements INotebook {
277277
this.ranInitialSetup = true;
278278
this._workingDirectory = undefined;
279279

280+
traceInfo(`Initial setup for ${this.identity.toString()} starting ...`);
281+
280282
try {
281283
// When we start our notebook initial, change to our workspace or user specified root directory
282284
await this.updateWorkingDirectoryAndPath();

src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ export class HostRawNotebookProvider
136136
notebookMetadata?: nbformat.INotebookMetadata,
137137
cancelToken?: CancellationToken
138138
): Promise<INotebook> {
139+
traceInfo(`Creating raw notebook for ${identity.toString()}`);
139140
const notebookPromise = createDeferred<INotebook>();
140141
this.setNotebook(identity, notebookPromise.promise);
141142

142143
const progressReporter = !disableUI
143144
? this.progressReporter.createProgressIndicator(localize.DataScience.connectingIPyKernel())
144145
: undefined;
145146

147+
traceInfo(`Computing working directory ${identity.toString()}`);
146148
const workingDirectory = await computeWorkingDirectory(resource, this.workspaceService);
147149

148150
const rawSession = new RawJupyterSession(
@@ -156,6 +158,8 @@ export class HostRawNotebookProvider
156158
try {
157159
const launchTimeout = this.configService.getSettings().datascience.jupyterLaunchTimeout;
158160

161+
traceInfo(`Getting preferred kernel for ${identity.toString()}`);
162+
159163
// We need to locate kernelspec and possible interpreter for this launch based on resource and notebook metadata
160164
const kernelConnectionMetadata = await this.kernelSelector.getPreferredKernelForLocalConnection(
161165
resource,
@@ -173,6 +177,7 @@ export class HostRawNotebookProvider
173177
) {
174178
notebookPromise.reject('Failed to find a kernelspec to use for ipykernel launch');
175179
} else {
180+
traceInfo(`Connecting to raw session for ${identity.toString()}`);
176181
await rawSession.connect(kernelConnectionMetadata, launchTimeout, cancelToken);
177182

178183
// Get the execution info for our notebook

0 commit comments

Comments
 (0)