Skip to content
Discussion options

You must be logged in to vote

Update:
I've found it easier to debug OC code this way, the only downside is that it's not in the same solution

  1. Run the Powershell script
  2. Run CTRL +F5 in my solution
  3. Attach to the process in the OC source code

更新一下:
我发现这种方式可以更方便的调试OC代码,唯一的不足就是不在同一个解决方案

  1. 执行下方Powershell 脚本
  2. 在我的解决方案中ctrl+F5 运行
  3. 在OC源码中附加到进程

Powershell

# $myPath  = xxxx.Cms.Web\bin\Debug\net5.0\
$ocpath = "..\OrchardCore\src\OrchardCore.Cms.Web\bin\Debug\net5.0\"
$ocBuild = Get-ChildItem $ocpath 

$mybuild= Get-ChildItem $myPath  | Where-Object { $_.Name -match"^OrchardCore(.*)dll"  } 
foreach( $my in $mybuild){
    foreach($ocItem in $ocBuild){
        if($my.Name -eq $ocItem.Name){
            Copy $ocItem.FullName  $my.PSP…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@hyzx86
Comment options

Comment options

You must be logged in to vote
2 replies
@scil
Comment options

@hyzx86
Comment options

Answer selected by hyzx86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants