Browse Source

[Backport to 3.3.x] Fix the debug modules model #11967 (#11968)

* fix the debug modules model

* use name and path fields from the modules response
Eric Charles 3 years ago
parent
commit
38c6f00317

+ 0 - 1
packages/debugger/src/panels/kernelSources/body.ts

@@ -53,7 +53,6 @@ export class KernelSourcesBody extends Widget {
 
     this._model.changed.connect((_, kernelSources) => {
       this._clear();
-      console.log('---', kernelSources);
       if (kernelSources) {
         kernelSources.forEach(module => {
           const name = module.name;

+ 0 - 8
packages/debugger/src/panels/kernelSources/filter.tsx

@@ -18,14 +18,6 @@ export interface IFilterBoxProps {
 }
 
 const FilterBox = (props: IFilterBoxProps) => {
-  /**
-   * Handler for search input changes.
-  const handleChange = (e: React.FormEvent<HTMLElement>) => {
-    const target = e.target as HTMLInputElement;
-    setFilter(target.value);
-    props.model.filter = target.value;
-  };
-  */
   return (
     <InputGroup
       type="text"

+ 2 - 2
packages/debugger/src/service.ts

@@ -860,8 +860,8 @@ export class DebuggerService implements IDebugger, IDisposable {
     this._model.kernelSources.kernelSources = modules.body.modules.map(
       module => {
         return {
-          name: Object.keys(module)[0],
-          path: Object.values(module)[0]
+          name: module.name as string,
+          path: module.path as string
         };
       }
     );