Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>convert-current-file-to-module-styleNew to Visual Studio Code? Get it now.
convert-current-file-to-module-style

convert-current-file-to-module-style

Matanel Oren

|
3 installs
| (0) | Free
Converts the current dir to a module style
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

convert-current-file-to-module-style README

Overview

The convert-current-file-to-module-style extension for Visual Studio Code provides a command to convert the current file's directory path to a module style format, replacing slashes with dots. This can be useful for various development scenarios where a dot-separated path is required.

Features

  • Get Relative Directory with Dots: Converts the current file's directory path to a dot-separated format and displays it in an information message.

Use in launch.json

Add this to your launch.json to enable running your project as a package from any main inside while using relative imports:

{ "name": "Launch Current File as Package", "type": "debugpy", "request": "launch", "module": "${command:extension.commandvariable.file.relativeDirDots}.${fileBasenameNoExtension}", "cwd": "${workspaceFolder}", "console": "integratedTerminal", "env": { "PYTHONPATH": "${workspaceFolder}", }, "justMyCode": true }

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft