SPNote

SharePoint Notes

SharePoint 2010 Debugging

SharePoint 2010 Debugging  은 SP 2007 과 거의 같습니다. (지금 SP 2007 web.config 가 없어서 확신이 없음...) 이전 글에서 AllowInefficientQueries 에러를 만나고 나서 이전 방식으로 Web.config 파일을 수정했는데, Visual Studio 에서 Script Debugging 이 잘 동작했습니다. 주석으로 Line 번호를 추가하였으니 문자열 검색 혹은 VS 에서 Ctrl + G 하시고 Line 번호 넣고 찾아가셔도 됩니다.

SharePoint 2010 Debugging is almost same with MOSS 2007. Find a web.config file for your Web Application and change values.
  - Path might be: "C:\Inetpub\wwwroot\wss\VirtualDirectoties\<YourWebApplicationName>”
    ex) C:\inetpub\wwwroot\wss\VirtualDirectories\intranet.spnote.dev80

수정할 부분은 아래와 같습니다.
What items should you change are below.

  1. CallStack : true
  2. customErrors : Off (case sensitive)
  3. debug: true

[code:xml;ln=off]

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <SharePoint>
    <SafeMode CallStack="true"> <!-- Line: 51 -->
  </SharePoint>
  <system.web>
    <customErrors mode="Off" /> <!-- Line: 341 -->
    <debug="true">              <!-- Line: 350 -->
  </system.web>
</configuration>

[/code]

위 설정을 완료했음에도 아래의 메시지가 나타날 수 있습니다.
Even though you have configured the values on web.config, you may encounter an error screen below.

image

이때 주소가 /_layouts/* 로 시작된 것이라면 이 Virtual Directory 내의 Web.config 파일도 수정을 해야합니다. 이때는 customErrors Mode 만 Off 로 설정하면 됩니다.
If the URL is like /_layouts/* then you need to change the web.config in _layouts(Virtual Directory) as well. You can simply change customErros Mode to Off.
  - Path: 14 HIVE\TEMPLATE\LAYOUTS\web.config

image

[참고]
- Download Web.config: web.config.zip (9.48 kb)

Add comment

Loading