How to Debug a Windows Vista Sidebar Gadget With Visual Studio दृश्य स्टूडियो के साथ Windows Vista साइडबार गैजेट डीबग कैसे
One of the ancillary benefits of our के सहायक लाभों में से एक हमारे Vista Gadget breaking विस्टा गैजेट तोड़ने and my email filling up with complaints was that I learned how to debug a Vista Gadget in Visual Studio, so I'm sharing the wealth with everybody. और मेरे ईमेल की शिकायतों के साथ भरने था कि मैं कैसे दृश्य स्टूडियो में एक Vista गैजेट डिबग को सीखा है, तो मैं सबके साथ संपत्ति बंटवारे हूँ.
For this exercise you'll need a copy of Visual Studio 2005 and a broken Vista Gadget, but you can probably adapt it to work with a different tool if you try. इस अभ्यास तुम दृश्य 2005 स्टूडियो और एक टूटी हुई Vista गैजेट की एक प्रति की आवश्यकता होगी के लिए, लेकिन तुम शायद यह अनुकूलन के लिए एक अलग उपकरण के साथ काम अगर तुम कोशिश कर सकते हैं.
Critical Step: Enable Script Debugging महत्वपूर्ण कदम: स्क्रिप्ट Debugging सक्षम करें
Open up Internet Explorer's Options panel, find the Advanced tab and uncheck the boxes for “Disable script debugging”. Internet Explorer की विकल्प पैनल खोलो, 'के लिए निष्क्रिय स्क्रिप्ट debugging उन्नत टैब और सही का निशान हटाएँ बक्से खोज'.

After you are done debugging you'll probably want to turn this off, as it can get quite annoying while browsing. तुम्हारे जाने के बाद debugging आप शायद इस बंद चाहता हूँ किया, क्योंकि यह बहुत कष्टप्रद ब्राउज़ करते समय प्राप्त कर सकते हैं.
Open Your Gadget Code अपने गैजेट कोड ओपन
After installing your gadget, Windows will unpack and copy the files to a folder in your user profile. अपने गैजेट के लिए स्थापित करने के बाद, Windows खोलना और आपके उपयोगकर्ता प्रोफ़ाइल में एक फ़ोल्डर में फ़ाइलों की प्रतिलिपि होगा. We'll need to find this folder and open the javascript file that makes up the logic for your gadget. हम इस फ़ोल्डर खोजने की जरूरत है और जावास्क्रिप्ट फ़ाइल है कि अपने गैजेट के लिए तर्क है खोल देता हूँ.
Just paste the following into the Explorer address bar: बस Explorer पता पट्टी में निम्नलिखित चिपकाएँ:
%LOCALAPPDATA%\Microsoft\Windows Sidebar\Gadgets % LOCALAPPDATA% \ Microsoft \ Windows साइडबार \ गैजेट्स

You'll see a list of directories for all the gadgets installed into your profile. आप सब अपने प्रोफ़ाइल में स्थापित गैजेट के लिए निर्देशिका की एक सूची देखेंगे. Open up the main javascript file in Visual Studio. खुले दृश्य स्टूडियो में मुख्य जावास्क्रिप्ट फाइल करो.
Attach to Sidebar Process संलग्न साइडबार के लिए प्रक्रिया
Next we'll need to attach to the specific sidebar process for your gadget. अगले हम आपके गैजेट के लिए विशिष्ट साइडबार प्रक्रिया को संलग्न करना होगा. (Make sure your gadget is running before you do this step) (सुनिश्चित करें कि आपके गैजेट के लिए इससे पहले कि आप इस कदम क्या चल रहा है करो)
Go to Tools \ Attach to Process or hit Ctrl+Alt+P to bring up the dialog. उपकरण पर जाएँ \ संलग्न करने की प्रक्रिया या हिट Ctrl + Alt + P ऊपर लाने के लिए संवाद.

Now you should look for a process named “sidebar.exe” with the title set to the name of your gadget, and then click the Attach button. अब तुम एक "अपने गैजेट के नाम से स्थापित शीर्षक के साथ sidebar.exe", और फिर क्लिक करें बटन संलग्न नाम प्रक्रिया के लिए दिखना चाहिए.

For a close-up view, you can see that the gadget is running under a separate process from the main sidebar, but the title is set to “How-To Geek”. देखने के एक करीबी के लिए, आप उस गैजेट के मुख्य साइडबार से एक अलग प्रक्रिया के तहत चल रहा है देख सकते हैं, लेकिन सेट शीर्षक है 'कैसे करें geek ". 
Now comes the critical step… click to set a breakpoint just to the left of the white area… अब महत्वपूर्ण कदम आता है ... पर क्लिक करें सिर्फ सफेद क्षेत्र के बाईं ओर एक ब्रेकपाइंट सेट के लिए ...

If all goes well, you will immediately be taken to a new file named something like x-gadget:///main.js and your debugging tools will become active as soon as the breakpoint is hit. अगर सब कुछ ठीकठाक रहा, तो आप तुरंत पर ले जाया जाएगा एक नई एक्स जैसे कुछ-गैजेट: / / main.js / और अपने debugging उपकरण के रूप में जल्द ही सक्रिय हो जाएगा के रूप में ब्रेकपाइंट मारा है फ़ाइल नाम.

Note that you can't modify this file, but you can use the Immediate Window to test out any code in real-time. ध्यान दें कि आप इस फ़ाइल को संशोधित नहीं कर सकते, लेकिन आप तत्काल विंडो का उपयोग करने से वास्तविक समय में किसी भी कोड की जांच कर सकता है.
Important Notes महत्वपूर्ण नोट्स
- When debugging a gadget that polls every so often, it would be wise to set the interval really low so that you don't have to wait very long for it to trigger. जब एक गैजेट है कि चुनाव हर इतनी बार debugging, यह बुद्धिमान होगा कि वास्तव में बहुत कम है कि आप बहुत लंबा इंतजार के लिए यह ट्रिगर करने के लिए नहीं है अंतराल सेट.
- You can make changes in the original source file, but you will have to close/reopen the gadget and then re-attach to it. आप मूल स्रोत फ़ाइल में परिवर्तन कर सकते हैं, लेकिन आप के पास है / गैजेट के लिए फिर से खोलना होगा और फिर तो, यह देते हैं.
- If you get an error about no symbols being loaded, you didn't follow the first step to enable script debugging. यदि आप कोई प्रतीकों के बारे में कोई त्रुटि मिलती है भरी जा रहा है, आप पहले कदम के लिए स्क्रिप्ट debugging को सक्षम का पालन नहीं किया.
- You'll have to manually enter the names of variables to watch in the Watch box, but you can step through the gadget just like a real debugger should. आप स्वयं चर के नाम में प्रवेश के लिए देखो बॉक्स में घड़ी है, लेकिन आप गैजेट के माध्यम से सिर्फ एक असली डिबगर जैसे कदम चाहिए कर सकते हैं.
Happy debugging! खुश debugging!

Daily Email Updates दैनिक ईमेल अपडेट
You can get our how-to articles in your inbox each day for free. आप अपने इनबॉक्स में हमारे कैसे लेख को मुफ्त के लिए प्रत्येक दिन प्राप्त कर सकते हैं. Just enter your name and email below: बस नीचे अपना नाम और ईमेल दर्ज करें:



[quote]If you get an error about no symbols being loaded, you didn't follow the first step to enable script debugging.[/quote] बोली [] यदि आप कोई प्रतीकों के बारे में कोई त्रुटि मिलती है भरी हुई है, तुम पहले कदम के लिए स्क्रिप्ट debugging को सक्षम का पालन नहीं किया. बोली [/ जा रहा है]
Or you didn't completely restart sidebar.exe. या तुम पूरी तरह से sidebar.exe पुनः आरंभ नहीं किया है. Running VistaSP2, IE8, VS2008. VistaSP2, IE8, VS2008 चल रहा है. Restart of sidebar.exe was required to reload the debugging settings. Sidebar.exe के पुनः आरंभ करने debugging सेटिंग्स पुनः लोड की आवश्यकता थी.