We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Install Node.js 16 or above. (Verify by node --version)
node --version
Install Python 3.7+. (Verify by python --version)
python --version
Install pnpm with cmd npm install -g pnpm
pnpm
npm install -g pnpm
Install cadl with cmd npm install -g @cadl-lang/compiler
cadl
npm install -g @cadl-lang/compiler
Clone autorest.python.
Step into repo autorest.python and run:
autorest.python
pnpm install pnpm build
packages/cadl-python
cadl compile {your-cadl-files}/. --emit=@azure-tools/cadl-python
The generated SDK code will be in cadl-output
cadl-output
cadl-python
copy following configuration in launch.json:
launch.json
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "authoring", "request": "launch", "cwd": "${workspaceFolder}/packages/cadl-python/authoring", "runtimeArgs": ["compile", ".", "--emit", "@azure-tools/cadl-python"], "runtimeExecutable": "cadl", "skipFiles": ["<node_internals>/**"], "type": "node", "outFiles": [ "${workspaceFolder}/packages/*/dist/**/*.js", "${workspaceFolder}/packages/*/dist-dev/**/*.js", "${workspaceFolder}/core/packages/*/dist/**/*.js", "${workspaceFolder}/core/packages/*/dist-dev/**/*.js" ] } ] }
Then you can debug in emitter.ts of cadl-python
emitter.ts