JupyterLab Debugger 使用教程

JupyterLab Debugger 使用教程

debuggerA visual debugger for Jupyter notebooks, consoles, and source files项目地址:https://gitcode.com/gh_mirrors/de/debugger

1. 项目的目录结构及介绍

JupyterLab Debugger 项目的目录结构如下:

jupyterlab/
├── .github/
├── docs/
├── examples/
├── packages/
│   ├── debugger/
│   ├── debugger-extension/
│   ├── ...
├── scripts/
├── style/
├── tests/
├── tsconfigbase.json
├── ...

目录介绍

  • .github/: 包含 GitHub 相关的配置文件,如 issue 模板、PR 模板等。
  • docs/: 包含项目的文档文件,如用户指南、开发者文档等。
  • examples/: 包含示例代码,帮助用户理解如何使用该项目。
  • packages/: 包含项目的各个子包,其中 debuggerdebugger-extension 是核心包。
  • scripts/: 包含一些脚本文件,用于项目的构建、测试等。
  • style/: 包含项目的样式文件。
  • tests/: 包含项目的测试文件。
  • tsconfigbase.json: TypeScript 配置文件。

2. 项目的启动文件介绍

JupyterLab Debugger 的启动文件主要位于 packages/debugger-extension 目录下。关键文件包括:

  • src/index.ts: 这是扩展的入口文件,负责初始化和注册调试器扩展。
  • src/tokens.ts: 定义了调试器扩展所需的一些 Token 和接口。
  • src/debugger.ts: 包含了调试器的主要逻辑和功能。

启动文件介绍

  • index.ts:
    import {
      JupyterFrontEnd,
      JupyterFrontEndPlugin
    } from '@jupyterlab/application';
    
    import {
      IDebugger
    } from './tokens';
    
    import {
      Debugger
    } from './debugger';
    
    /**
     * Initialization data for the debugger-extension extension.
     */
    const extension: JupyterFrontEndPlugin<IDebugger> = {
      id: 'debugger-extension:plugin',
      autoStart: true,
      provides: IDebugger,
      activate: (app: JupyterFrontEnd) => {
        const debuggerInstance = new Debugger();
        return debuggerInstance;
      }
    };
    
    export default extension;
    

3. 项目的配置文件介绍

JupyterLab Debugger 的配置文件主要位于项目的根目录下。关键配置文件包括:

  • package.json: 包含了项目的依赖、脚本命令、版本信息等。
  • tsconfig.json: TypeScript 的编译配置文件。
  • jupyterlab_debugger.json: 可能包含一些特定于调试器的配置选项。

配置文件介绍

  • package.json:
    {
      "name": "jupyterlab-debugger",
      "version": "0.3.0",
      "description": "A JupyterLab extension for debugging.",
      "keywords": [
        "jupyter",
        "jupyterlab",
        "jupyterlab-extension"
      ],
      "homepage": "https://github.com/jupyterlab/debugger",
      "bugs": {
        "url": "https://github.com/jupyterlab/debugger/issues"
      },
      "license": "BSD-3-Clause",
      "author": "Project Jupyter",
      "main": "lib/index.js",
      "types": "lib/index.d.ts",
      "files": [
        "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
        "style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
      ],
      "repository": {
        "type": "git",
        "url": "https://github.com/jupyterlab/debugger.git"
      },
      "scripts": {
        "build": "tsc",
        "clean": "rimraf lib",
        "prepare": "npm run clean && npm run build",
        "watch": "tsc -w"
      },
      "dependencies": {
        "@jupyterlab/application": "^2.
    

debuggerA visual debugger for Jupyter notebooks, consoles, and source files项目地址:https://gitcode.com/gh_mirrors/de/debugger

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

张栋涓Kerwin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值