Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Fast Log Dota2New to Visual Studio Code? Get it now.
Fast Log Dota2

Fast Log Dota2

laobietou

|
210 installs
| (1) | Free
fast generate print() in .ts and $.Msg() in .tsx
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Main Functionality


For Dota2 custom addons makers. Fast print variables, use print() in .ts files, $.Msg() in .tsx files, print() in .lua files, and $.Msg() in .js files.

Features


// ts file
OnSpellStart(): void {
	const caster = this.GetCaster()
    // Fast-generate log
	print('~OnSpellStart() ~caster:' , caster)
}

// tsx file
export function Test() {
	const [count, setCount] = useState(0)
    // Fast-generate log
	$.Msg('~Test() ~count:' , count)
}

// lua file
function ability_arena.prototype.OnSpellStart(self)
    -- Fast-generate log
    print('~OnSpellStart() ~self:' .. tostring(self))
end

// js file
function handleClick() {
    const value = getValue()
    // Fast-generate log
    $.Msg('~handleClick()~value:' , value)
}

Usage


  • Selecting the variable (or not) -> Press ctrl + shift + L, or right-click and select "Generate Log"

  • ctrl + shift + P -> Input Annotation Logs

  • ctrl + shift + P -> Input Unannotation Logs

功能

DOTA2 制图用的 快速打印变量,在 ts 文件中用 print(),在 tsx/js 文件中用 $.Msg(),在 lua 文件中用 print() 注释全部 log 取消注释全部 log

例子


// ts file
OnSpellStart(): void {
	const caster = this.GetCaster()
    // 快速生成
	print('~OnSpellStart() ~caster:' , caster)
}

// tsx file
export function Test() {
	const [count, setCount] = useState(0)
    // 快速生成
	$.Msg('~Test() ~count:' , count)
}

// lua file
function OnSpellStart(self)
    -- 快速生成
    print('~OnSpellStart() ~self:' .. tostring(self))
end

// js file
function handleClick() {
    const value = getValue()
    // 快速生成
    $.Msg('~handleClick()~value:' , value)
}

用法


  • 选中/不选中变量 -> 按快捷键 ctrl + shift + L ,或者点击右键选择 Generate log

  • ctrl + shift + P -> 输入 Annotation Logs

  • ctrl + shift + P -> 输入 Unannotation Logs

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft