.NET/C#:如何设置调试环境变量 COMPLUS_HeapVerify? [英] .NET/C#: How to set debugging environment variable COMPLUS_HeapVerify?

查看:22
本文介绍了.NET/C#:如何设置调试环境变量 COMPLUS_HeapVerify?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次垃圾收集器 (GC) 完成其工作.我读到这可以通过将环境变量 COMPLUS_HeapVerify 设置为 1 来完成.但是我究竟如何设置这个变量?

I need the heap to be verified each time the garbage collector (GC) finishes its work. I read this can be done by setting the environment variable COMPLUS_HeapVerify to 1. But how exactly do I set this variable?

我读到这可以通过计算机/高级系统设置/高级/环境变量(Windows 7)来完成,有人告诉我应该设置一个新的系统变量(此处),其他人说这应该是一个用户变量(此处).

I read this can be done via Computer/Advanced System Settings/Advanced/Environment Variables (Windows 7), somebody tells I should set up a new system variable (here), others tell this should be a user variable (here).

这种方法是否正确?应该设置哪个(系统或用户)变量?

Is this approach correct and which (system or user) variable should be set?

推荐答案

你提到的方法是完全正确的.

The approach you mentioned is absolutely correct.

  1. 进入控制面板->系统属性->高级系统设置->环境变量.

  1. Go to Control Panel->System Properties->Advanced System Settings->Environment Variables.

如果你有管理员权限,添加一个名为COMPLUS_HeapVerify"的系统变量,值为1";否则 - 添加用户.请注意,在第二种情况下,您可能需要注销并重新登录.

If you have administrator privileges, add a system variable called "COMPLUS_HeapVerify" with a value of "1"; otherwise — add the user one. Note, in the second case you might need to log out and log on.

希望有所帮助.

这篇关于.NET/C#:如何设置调试环境变量 COMPLUS_HeapVerify?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆